insertIfMissing overloads

Synopses

Declared in <bslstl_hashtable.h>

Insert a default‐mapped value for a movable key if missing.

Insert a default‐mapped value for key if the key is missing.

Insert a movable value if no equivalent key is present.

Insert value if no equivalent key is present.

bslalg::BidirectionalLink*
insertIfMissing(
    bool* isInsertedFlag,
    ValueType const& value);

Insert a value from value if no equivalent key is present.

template<class SOURCE_TYPE>
bslalg::BidirectionalLink*
insertIfMissing(
    bool* isInsertedFlag,
    SOURCE_TYPE&& value);

Return Value

  • address of the element whose key is equivalent to key

  • address of the (possibly newly inserted) element with an equivalent key

Parameters

Name

Description

key

movable key used to find or insert an element

isInsertedFlag

set to true if a new entry was inserted

value

movable value to insert if missing

Created with MrDocs