BloombergLP::bdlcc::SkipList::addUnique

addUnique overloads

Synopses

Declared in <bdlcc_skiplist.h>

Add key/data if key is not already in the list.

int
addUnique(
    KEY const& key,
    DATA const& data,
    bool* newFrontFlag = 0);
» more...

Add a unique key/data pair and load a handle into result.

int
addUnique(
    PairHandle* result,
    KEY const& key,
    DATA const& data,
    bool* newFrontFlag = 0);
» more...

Return Value

0 on success, and a non-zero value if key already exists

Parameters

NameDescription
keykey of the pair
datadata associated with key
newFrontFlagif non-null, set to whether the pair is at the front
resultreceives a reference to the inserted pair