BloombergLP::bslstl::HashTable::insertIfMissing

insertIfMissing overloads

Synopses

Declared in <bslstl_hashtable.h>

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

bslalg::BidirectionalLink*
insertIfMissing(bslmf::MovableRef<NonConstKeyType> key);
» more...

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

bslalg::BidirectionalLink*
insertIfMissing(KeyType const& key);
» more...

Insert a movable value if no equivalent key is present.

bslalg::BidirectionalLink*
insertIfMissing(
    bool* isInsertedFlag,
    bslmf::MovableRef<ValueType> value);
» more...

Insert value if no equivalent key is present.

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

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

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

Return Value

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

Parameters

NameDescription
keymovable key used to find or insert an element
isInsertedFlagset to true if a new entry was inserted
valuemovable value to insert if missing