[#BloombergLP-bslstl-HashTable-09-tryEmplace-00]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::xref:BloombergLP/bslstl/HashTable-09.adoc[HashTable&lt;UnorderedMapKeyConfiguration&lt;basic&lowbar;string&lt;char&gt; const, pair&lt;basic&lowbar;string&lt;char&gt; const, Json&gt;&gt;, TransparentHash, TransparentEqualTo, allocator&lt;pair&lt;basic&lowbar;string&lt;char&gt; const, Json&gt;&gt;&gt;]::tryEmplace
:relfileprefix: ../../../
:mrdocs:

If a key equivalent to the specified `key` already exists in this hash&hyphen;table, load `false` into the specified `isInsertedFlag` and return a pointer to the existing entry&period; Otherwise, insert into this hash&hyphen;table a newly&hyphen;created `value&lowbar;type` object, constructed from `key` and the specified `args`, load `true` into `isInsertedFlag` and return a pointer to the newly created entry&period; Use the optionally specified `hint` as a starting place for the search for the existing key&period;

== Synopsis

Declared in `&lt;bslstl&lowbar;hashtable&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class LOOKUP&lowbar;KEY,
    class&period;&period;&period; ARGS&gt;
xref:BloombergLP/bslalg/BidirectionalLink.adoc[bslalg::BidirectionalLink]*
tryEmplace(
    bool* isInsertedFlag,
    xref:BloombergLP/bslalg/BidirectionalLink.adoc[bslalg::BidirectionalLink]* hint,
    LOOKUP&lowbar;KEY&& key,
    ARGS&&&period;&period;&period; args)
requires BloombergLP&colon;&colon;bslmf&colon;&colon;IsTransparentPredicate&lt;HASHER,    LOOKUP&lowbar;KEY&gt;&colon;&colon;value
   &amp;&amp; BloombergLP&colon;&colon;bslmf&colon;&colon;IsTransparentPredicate&lt;COMPARATOR,LOOKUP&lowbar;KEY&gt;&colon;&colon;value;
----


[.small]#Created with https://www.mrdocs.com[MrDocs]#
