[#BloombergLP-bdlc-FlatHashMap-insert-08]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlc.adoc[bdlc]::xref:BloombergLP/bdlc/FlatHashMap.adoc[FlatHashMap]::insert
:relfileprefix: ../../../
:mrdocs:

`insert` overloads

== Synopses

Declared in `&lt;bdlc&lowbar;flathashmap&period;h&gt;`

Insert each element from the specified `values` list&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
xref:BloombergLP/bdlc/FlatHashMap/insert-0a.adoc[insert](bsl::initializer&lowbar;list&lt;value&lowbar;type&gt; values);
----

[.small]#xref:BloombergLP/bdlc/FlatHashMap/insert-0a.adoc[_» more&period;&period;&period;_]#

Insert `value` if its key is not already present&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class VALUE&lowbar;TYPE&gt;
xref:bsl/pair-0b.adoc[bsl::pair&lt;iterator, bool&gt;]
xref:BloombergLP/bdlc/FlatHashMap/insert-00.adoc[insert](VALUE&lowbar;TYPE&& value)
requires bsl&colon;&colon;is&lowbar;constructible&lt;value&lowbar;type,
                                                  VALUE&lowbar;TYPE&amp;&amp;&gt;&colon;&colon;value;
----

[.small]#xref:BloombergLP/bdlc/FlatHashMap/insert-00.adoc[_» more&period;&period;&period;_]#

Insert each element from the `&lsqb;first, last)&rsqb;` range&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class INPUT&lowbar;ITERATOR&gt;
void
xref:BloombergLP/bdlc/FlatHashMap/insert-0f.adoc[insert](
    INPUT&lowbar;ITERATOR first,
    INPUT&lowbar;ITERATOR last);
----

[.small]#xref:BloombergLP/bdlc/FlatHashMap/insert-0f.adoc[_» more&period;&period;&period;_]#

Insert `value` if its key is not already present&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class VALUE&lowbar;TYPE&gt;
xref:BloombergLP/bdlc/FlatHashMap/iterator.adoc[iterator]
xref:BloombergLP/bdlc/FlatHashMap/insert-03.adoc[insert](
    xref:BloombergLP/bdlc/FlatHashMap/const_iterator.adoc[const&lowbar;iterator] hint,
    VALUE&lowbar;TYPE&& value)
requires bsl&colon;&colon;is&lowbar;constructible&lt;value&lowbar;type,
                                                  VALUE&lowbar;TYPE&amp;&amp;&gt;&colon;&colon;value;
----

[.small]#xref:BloombergLP/bdlc/FlatHashMap/insert-03.adoc[_» more&period;&period;&period;_]#

== Return Value

* pair of iterator to the element and whether insertion occurred
* iterator to the (possibly newly inserted) element

== Parameters

[cols="1,4"]
|===
| Name| Description
| *values*
| initializer list of key&sol;value pairs to insert
| *value*
| value to insert
| *first*
| beginning of the input range
| *last*
| end of the input range (exclusive)
| *hint*
| iterator hint (ignored)
|===


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