[#bsl-set-0d-emplace] = xref:bsl.adoc[bsl]::xref:bsl/set-0d.adoc[set]::emplace :relfileprefix: ../../ :mrdocs: Emplace a newly constructed `value_type` if not already present. == Synopsis Declared in `<bslstl_set.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class... Args> xref:bsl/pair-0b.adoc[pair<set<KEY, COMPARATOR, ALLOCATOR>::iterator, bool>] emplace(Args&&... arguments); ---- == Description Construct by forwarding `get_allocator()` (if required) and the specified `arguments` to the corresponding constructor of `value_type`; otherwise this method has no effect (other than possibly creating a temporary `value_type` object). Return a pair whose `first` member is an iterator referring to the (possibly newly created and inserted) object in this set whose value is equivalent to that of an object constructed from `arguments`, and whose `second` member is `true` if a new value was inserted, and `false` if an equivalent key was already present. This method requires that the (template parameter) type `KEY` be `emplace‐constructible` from `arguments` (see {Requirements on `KEY`}). == Return Value pair of iterator and whether a new element was inserted == Parameters [cols="1,4"] |=== | Name| Description | *arguments* | constructor arguments for the new element |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#