[#bsl-map-0a7-try_emplace-0de] = xref:bsl.adoc[bsl]::xref:bsl/map-0a7.adoc[map]::try_emplace :relfileprefix: ../../ :mrdocs: Try to emplace an element with a movable `key`. == Synopsis Declared in `<bslstl_map.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class... Args> xref:bsl/pair-0b.adoc[pair<map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator, bool>] try_emplace( xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef<KEY>] key, Args&&... args); ---- == Description Same as the preceding `try_emplace` overload, for movable keys. == Return Value pair of iterator and whether a new element was inserted == Parameters [cols="1,4"] |=== | Name| Description | *key* | key to move into the new element | *args* | constructor arguments for the mapped value |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#