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

Insert the specified `value` into this hash&hyphen;table if a key equivalent to that of `value` does not already exist in this hash&hyphen;table&period; Return the address of the (possibly newly inserted) element in this hash&hyphen;table whose key is equivalent to that of `value`&period; If this hash&hyphen;table contains more than one element with a matching key, return the first such element (from the contiguous sequence of elements having a matching key)&period; Additional buckets are 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&hyphen;table&apos;s `SizeType`, a `std&colon;&colon;length&lowbar;error` exception is thrown&period; This method requires that the `ValueType` defined in the (template parameter) type `KEY&lowbar;CONFIG` be `copy&hyphen;insertable` into this hash&hyphen;table (see &lcub;Requirements on `KEY&lowbar;CONFIG`&rcub;)&semi;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bslalg/BidirectionalLink.adoc[bslalg::BidirectionalLink]*
insertIfMissing(
    bool* isInsertedFlag,
    xref:BloombergLP/bslstl/HashTable-06/ValueType.adoc[ValueType] const& value);
----


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