BloombergLP::bslalg::RbTreeUtil::findInsertLocation

findInsertLocation overloads

Synopses

Declared in <bslalg_rbtreeutil.h>

Return the parent for inserting value into tree.

template<
    class NODE_VALUE_COMPARATOR,
    class VALUE>
static
RbTreeNode*
findInsertLocation(
    bool* insertAsLeftChildFlag,
    RbTreeAnchor* tree,
    NODE_VALUE_COMPARATOR& comparator,
    VALUE const& value);
» more...

Return the insert parent for value, using an optional hint.

template<
    class NODE_VALUE_COMPARATOR,
    class VALUE>
static
RbTreeNode*
findInsertLocation(
    bool* insertAsLeftChildFlag,
    RbTreeAnchor* tree,
    NODE_VALUE_COMPARATOR& comparator,
    VALUE const& value,
    RbTreeNode* hint);
» more...

Return Value

address of the node that would be the parent of value

Parameters

NameDescription
insertAsLeftChildFlagset to whether value is a left child
treetree in which to locate the insert parent
comparatorfunctor used to order nodes against value
valuevalue whose insert location is returned
hintpossible immediate successor of value in tree