[#BloombergLP-bdlc-FlatHashTable-try_emplace-0b] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlc.adoc[bdlc]::xref:BloombergLP/bdlc/FlatHashTable.adoc[FlatHashTable]::try_emplace :relfileprefix: ../../../ :mrdocs: Insert a newly constructed entry for `key` unless an equivalent key exists. == Synopses Declared in `<bdlc_flathashtable.h>` Insert a newly constructed entry for `key` unless an equivalent key exists. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class... ARGS> xref:bsl/pair-0b.adoc[bsl::pair<FlatHashTable<KEY, ENTRY, ENTRY_UTIL, HASH, EQUAL>::iterator, bool>] xref:BloombergLP/bdlc/FlatHashTable/try_emplace-08.adoc[try_emplace]( xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef<KEY>] key, ARGS&&... args); ---- [.small]#xref:BloombergLP/bdlc/FlatHashTable/try_emplace-08.adoc[_» more..._]# Insert a newly constructed entry for `key` unless an equivalent key exists. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class... ARGS> xref:bsl/pair-0b.adoc[bsl::pair<FlatHashTable<KEY, ENTRY, ENTRY_UTIL, HASH, EQUAL>::iterator, bool>] xref:BloombergLP/bdlc/FlatHashTable/try_emplace-00.adoc[try_emplace]( KEY const& key, ARGS&&... args); ---- [.small]#xref:BloombergLP/bdlc/FlatHashTable/try_emplace-00.adoc[_» more..._]# Insert a newly constructed entry for `key` unless an equivalent key exists. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class LOOKUP_KEY, class... ARGS> xref:bsl/pair-0b.adoc[bsl::pair<iterator, bool>] xref:BloombergLP/bdlc/FlatHashTable/try_emplace-0d.adoc[try_emplace]( LOOKUP_KEY&& key, ARGS&&... args) requires BloombergLP::bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value && BloombergLP::bslmf::IsTransparentPredicate<EQUAL,LOOKUP_KEY>::value; ---- [.small]#xref:BloombergLP/bdlc/FlatHashTable/try_emplace-0d.adoc[_» more..._]# == Return Value pair of iterator to the entry and `true` if inserted == Parameters [cols="1,4"] |=== | Name| Description | *key* | key used to find or construct the entry | *args* | arguments forwarded to construct the mapped value |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#