tryEmplace overloads
Declared in <bslstl_hashtable.h>
Emplace a value for a movable key if missing; otherwise return existing.
template<class... ARGS>
bslalg::BidirectionalLink*
tryEmplace(
bool* isInsertedFlag,
bslalg::BidirectionalLink* hint,
bslmf::MovableRef<NonConstKeyType> key,
ARGS&&... args);
» more...
Emplace a value for key if missing; otherwise return the existing entry.
template<class... ARGS>
bslalg::BidirectionalLink*
tryEmplace(
bool* isInsertedFlag,
bslalg::BidirectionalLink* hint,
KeyType const& key,
ARGS&&... args);
» more...
Emplace a value for a transparent key if missing; otherwise return existing.
template<
class LOOKUP_KEY,
class... ARGS>
bslalg::BidirectionalLink*
tryEmplace(
bool* isInsertedFlag,
bslalg::BidirectionalLink* hint,
LOOKUP_KEY&& key,
ARGS&&... args)
requires BloombergLP::bslmf::IsTransparentPredicate<HASHER, LOOKUP_KEY>::value
&& BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,LOOKUP_KEY>::value;
» more...
pointer to the existing or newly created entry
| Name | Description |
|---|---|
| isInsertedFlag | set to true if a new entry was inserted |
| hint | optional starting node for the key search |
| key | movable key used to find or insert an entry |
| args | arguments used to construct the mapped value |