[#bsl-map-0af-try_emplace-09]
= xref:bsl.adoc[bsl]::xref:bsl/map-0af.adoc[map&lt;TimeInterval, Node*&gt;]::try&lowbar;emplace
:relfileprefix: ../../
:mrdocs:

If a key equivalent to the specified `key` already exists in this map, return a pair containing an iterator referring to the existing item and `false`&period; Otherwise, insert into this map a newly&hyphen;created entry constructed from `key` and the specified `args`, and return a pair containing an iterator referring to the newly&hyphen;created entry and `true`&period; This overload participates in overload resolution only when `LOOKUP&lowbar;KEY` is a transparent lookup key for `COMPARATOR`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class LOOKUP&lowbar;KEY,
    class&period;&period;&period; Args&gt;
xref:bsl/pair-0b.adoc[pair&lt;iterator, bool&gt;]
try&lowbar;emplace(
    LOOKUP&lowbar;KEY&& key,
    Args&&&period;&period;&period; args)
requires BloombergLP&colon;&colon;bslmf&colon;&colon;IsTransparentPredicate&lt;COMPARATOR,
                                                   LOOKUP&lowbar;KEY&gt;&colon;&colon;value &amp;&amp;
        !bsl&colon;&colon;is&lowbar;convertible&lt;LOOKUP&lowbar;KEY&amp;&amp;, const&lowbar;iterator&gt;&colon;&colon;value &amp;&amp;
        !bsl&colon;&colon;is&lowbar;convertible&lt;LOOKUP&lowbar;KEY&amp;&amp;, iterator&gt;&colon;&colon;value;
----


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