BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation

findUniqueInsertLocation overloads

Synopses

Declared in <bslalg_rbtreeutil.h>

Return the unique-insert parent or matching node for value.

template<
    class NODE_VALUE_COMPARATOR,
    class VALUE>
static
RbTreeNode*
findUniqueInsertLocation(
    int* comparisonResult,
    RbTreeAnchor* tree,
    NODE_VALUE_COMPARATOR& comparator,
    VALUE const& value);
» more...

Return the unique-insert location for value, using hint.

template<
    class NODE_VALUE_COMPARATOR,
    class VALUE>
static
RbTreeNode*
findUniqueInsertLocation(
    int* comparisonResult,
    RbTreeAnchor* tree,
    NODE_VALUE_COMPARATOR& comparator,
    VALUE const& value,
    RbTreeNode* hint);
» more...

Return Value

address of the matching node, or the parent for inserting value

Parameters

NameDescription
comparisonResultset to 0 on match, else left/right child sign
treetree in which to locate value or its insert parent
comparatorfunctor used to order nodes against value
valuevalue whose unique insert location is returned
hintpossible immediate successor of value in tree