[#absl-linked_hash_map-insert-00]
= xref:absl.adoc[absl]::xref:absl/linked_hash_map.adoc[linked&lowbar;hash&lowbar;map]::insert
:relfileprefix: ../../
:mrdocs:

`insert` overloads

== Synopses

Declared in `&lt;absl&sol;container&sol;linked&lowbar;hash&lowbar;map&period;h&gt;`

Inserts the elements of an initializer list into the map&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
xref:absl/linked_hash_map/insert-0e.adoc[insert](std::initializer&lowbar;list&lt;value&lowbar;type&gt; ilist);
----

[.small]#xref:absl/linked_hash_map/insert-0e.adoc[_» more&period;&period;&period;_]#

Inserts an element into the map&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
std::pair&lt;iterator, bool&gt;
xref:absl/linked_hash_map/insert-06.adoc[insert](xref:absl/linked_hash_map/value_type.adoc[value&lowbar;type] const& v);
----

[.small]#xref:absl/linked_hash_map/insert-06.adoc[_» more&period;&period;&period;_]#

Inserts an element via a node handle&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:absl/linked_hash_map/insert_return_type.adoc[insert&lowbar;return&lowbar;type]
xref:absl/linked_hash_map/insert-035.adoc[insert](xref:absl/linked_hash_map/node_type.adoc[node&lowbar;type]&& node);
----

[.small]#xref:absl/linked_hash_map/insert-035.adoc[_» more&period;&period;&period;_]#

Inserts an element into the map&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
std::pair&lt;iterator, bool&gt;
xref:absl/linked_hash_map/insert-0a.adoc[insert](xref:absl/linked_hash_map/value_type.adoc[value&lowbar;type]&& v);
----

[.small]#xref:absl/linked_hash_map/insert-0a.adoc[_» more&period;&period;&period;_]#

Inserts an element into the map, ignoring the position hint&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:absl/linked_hash_map/iterator.adoc[iterator]
xref:absl/linked_hash_map/insert-0c.adoc[insert](
    xref:absl/linked_hash_map/const_iterator.adoc[const&lowbar;iterator] hint,
    xref:absl/linked_hash_map/value_type.adoc[value&lowbar;type] const& v);
----

[.small]#xref:absl/linked_hash_map/insert-0c.adoc[_» more&period;&period;&period;_]#

Inserts an element via a node handle, ignoring the position hint&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:absl/linked_hash_map/iterator.adoc[iterator]
xref:absl/linked_hash_map/insert-033.adoc[insert](
    xref:absl/linked_hash_map/const_iterator.adoc[const&lowbar;iterator] hint,
    xref:absl/linked_hash_map/node_type.adoc[node&lowbar;type]&& node);
----

[.small]#xref:absl/linked_hash_map/insert-033.adoc[_» more&period;&period;&period;_]#

Inserts an element into the map, ignoring the position hint&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:absl/linked_hash_map/iterator.adoc[iterator]
xref:absl/linked_hash_map/insert-07.adoc[insert](
    xref:absl/linked_hash_map/const_iterator.adoc[const&lowbar;iterator] hint,
    xref:absl/linked_hash_map/value_type.adoc[value&lowbar;type]&& v);
----

[.small]#xref:absl/linked_hash_map/insert-07.adoc[_» more&period;&period;&period;_]#

Inserts the elements of the range `&lsqb;first, last)&rsqb;` into the map&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class InputIt&gt;
void
xref:absl/linked_hash_map/insert-0d.adoc[insert](
    InputIt first,
    InputIt last);
----

[.small]#xref:absl/linked_hash_map/insert-0d.adoc[_» more&period;&period;&period;_]#

== Return Value

* A pair of an iterator to the element and a bool that is `true` if insertion took place&period;
* The result of the insertion, including the node handle if insertion did not take place&period;
* An iterator to the inserted or existing element&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *ilist*
| The initializer list of elements to insert&period;
| *v*
| The value to insert&period;
| *node*
| The node handle holding the element to insert&period;
| *hint*
| A position hint, which is ignored&period;
| *first*
| An iterator to the first element to insert&period;
| *last*
| An iterator past the last element to insert&period;
|===


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