[#BloombergLP-bslstl-HashTable-06-emplaceWithHint]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::xref:BloombergLP/bslstl/HashTable-06.adoc[HashTable]::emplaceWithHint
:relfileprefix: ../../../
:mrdocs:

Insert into this hash&hyphen;table a newly&hyphen;created `ValueType` object, constructed by forwarding the specified (variable number of) `arguments` to the corresponding constructor of `ValueType` (immediately preceding the specified `hint` if `hint` is not null and the key of the node pointed to by `hint` is equivalent to that of the newly&hyphen;created object), and return the address of the newly inserted node&period; If `hint` is null or the key of the node pointed to by `hint` is not equivalent to that of the newly created object, and a key equivalent to that of the newly&hyphen;created object already exists in this hash&hyphen;table, then insert the newly&hyphen;created object immediately before the first such element&period; Additional buckets will be allocated, as needed, to preserve the invariant `loadFactor &lt;&equals; maxLoadFactor`&period; If this function tries to allocate a number of buckets larger than can be represented by this hash table&apos;s `SizeType`, a `std&colon;&colon;length&lowbar;error` exception is thrown&period; This method requires that `ValueType` defined in the (template parameter) type `KEY&lowbar;CONFIG` be `emplace&hyphen;constructible` into this hash&hyphen;table from `arguments` (see &lcub;Requirements on `KEY&lowbar;CONFIG`&rcub;)&period; The behavior is undefined unless `hint` is either null or points to a node in this hash table&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class&period;&period;&period; Args&gt;
xref:BloombergLP/bslalg/BidirectionalLink.adoc[bslalg::BidirectionalLink]*
emplaceWithHint(
    xref:BloombergLP/bslalg/BidirectionalLink.adoc[bslalg::BidirectionalLink]* hint,
    Args&&&period;&period;&period; arguments);
----


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