tryEmplace overloads
Synopses
Declared in <bslstl_hashtable.h>
If a key equivalent to the specified key already exists in this hash‐table, load false into the specified isInsertedFlag and return a pointer to the existing entry. Otherwise, insert into this hash‐table a newly‐created value_type object, constructed from std::forward<KEY>(key) and the specified args, load true into isInsertedFlag and return a pointer to the newly created entry. Use the optionally specified hint as a starting place for the search for the existing key.
template<class... ARGS>
bslalg::BidirectionalLink*
tryEmplace(
bool* isInsertedFlag,
bslalg::BidirectionalLink* hint,
bslmf::MovableRef<NonConstKeyType> key,
ARGS&&... args);
If a key equivalent to the specified key already exists in this hash‐table, load false into the specified isInsertedFlag and return a pointer to the existing entry. Otherwise, insert into this hash‐table a newly‐created value_type object, constructed from key and the specified args, load true into isInsertedFlag and return a pointer to the newly created entry. Use the optionally specified hint as a starting place for the search for the existing key.
template<class... ARGS>
bslalg::BidirectionalLink*
tryEmplace(
bool* isInsertedFlag,
bslalg::BidirectionalLink* hint,
KeyType const& key,
ARGS&&... args);
If a key equivalent to the specified key already exists in this hash‐table, load false into the specified isInsertedFlag and return a pointer to the existing entry. Otherwise, insert into this hash‐table a newly‐created value_type object, constructed from key and the specified args, load true into isInsertedFlag and return a pointer to the newly created entry. Use the optionally specified hint as a starting place for the search for the existing key.
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;
Created with MrDocs