[#BloombergLP-bslstl-HashTable-tryEmplace-02] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::xref:BloombergLP/bslstl/HashTable.adoc[HashTable]::tryEmplace :relfileprefix: ../../../ :mrdocs: `tryEmplace` overloads == Synopses Declared in `<bslstl_hashtable.h>` Emplace a value for a movable `key` if missing; otherwise return existing. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class... ARGS> xref:BloombergLP/bslalg/BidirectionalLink.adoc[bslalg::BidirectionalLink]* xref:BloombergLP/bslstl/HashTable/tryEmplace-09.adoc[tryEmplace]( bool* isInsertedFlag, xref:BloombergLP/bslalg/BidirectionalLink.adoc[bslalg::BidirectionalLink]* hint, xref:BloombergLP/bslmf/MovableRef.adoc[bslmf::MovableRef<NonConstKeyType>] key, ARGS&&... args); ---- [.small]#xref:BloombergLP/bslstl/HashTable/tryEmplace-09.adoc[_» more..._]# Emplace a value for `key` if missing; otherwise return the existing entry. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class... ARGS> xref:BloombergLP/bslalg/BidirectionalLink.adoc[bslalg::BidirectionalLink]* xref:BloombergLP/bslstl/HashTable/tryEmplace-00.adoc[tryEmplace]( bool* isInsertedFlag, xref:BloombergLP/bslalg/BidirectionalLink.adoc[bslalg::BidirectionalLink]* hint, xref:BloombergLP/bslstl/HashTable/KeyType.adoc[KeyType] const& key, ARGS&&... args); ---- [.small]#xref:BloombergLP/bslstl/HashTable/tryEmplace-00.adoc[_» more..._]# Emplace a value for a transparent `key` if missing; otherwise return existing. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class LOOKUP_KEY, class... ARGS> xref:BloombergLP/bslalg/BidirectionalLink.adoc[bslalg::BidirectionalLink]* xref:BloombergLP/bslstl/HashTable/tryEmplace-0b.adoc[tryEmplace]( bool* isInsertedFlag, xref:BloombergLP/bslalg/BidirectionalLink.adoc[bslalg::BidirectionalLink]* hint, LOOKUP_KEY&& key, ARGS&&... args) requires BloombergLP::bslmf::IsTransparentPredicate<HASHER, LOOKUP_KEY>::value && BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,LOOKUP_KEY>::value; ---- [.small]#xref:BloombergLP/bslstl/HashTable/tryEmplace-0b.adoc[_» more..._]# == Return Value pointer to the existing or newly created entry == Parameters [cols="1,4"] |=== | 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 |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#