[#bsl-unordered_set-0d2d-emplace_hint]
= xref:bsl.adoc[bsl]::xref:bsl/unordered_set-0d2d.adoc[unordered&lowbar;set]::emplace&lowbar;hint
:relfileprefix: ../../
:mrdocs:

Emplace a newly constructed element using `hint` if the key is missing&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class&period;&period;&period; Args&gt;
xref:bsl/unordered_set-0d2d/iterator.adoc[unordered&lowbar;set&lt;KEY, HASH, EQUAL, ALLOCATOR&gt;::iterator]
emplace&lowbar;hint(
    xref:bsl/unordered_set-0d2d/const_iterator.adoc[const&lowbar;iterator] hint,
    Args&&&period;&period;&period; arguments);
----

== Description

Insert into this unordered set a newly created `value&lowbar;type` object, constructed by forwarding `get&lowbar;allocator()` (if required) and the specified (variable number of) `arguments` to the corresponding constructor of `value&lowbar;type`, if a key equivalent to such a value does not already exists in this set&semi; otherwise, this method has no effect (other than possibly creating a temporary `value&lowbar;type` object)&period; Return 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`&period; The average and worst case complexity of this operation is not affected by the specified `hint`&period; This method requires that the (template parameter) type `KEY` be `emplace&hyphen;constructible` into this set from `arguments` (see &lcub;Requirements on `KEY`&rcub;)&period; The behavior is undefined unless `hint` is an iterator in the range `&lsqb;begin() &period;&period; end()&rsqb;` (both endpoints included)&period; Note that `hint` is ignored (other than possibly asserting its validity in some build modes)&period;

== Return Value

iterator to the existing or newly inserted element

== Parameters

[cols="1,4"]
|===
| Name| Description
| *hint*
| position hint for insertion
| *arguments*
| constructor arguments for the new element
|===


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