[#absl-linked_hash_set-insert-03e]
= xref:absl.adoc[absl]::xref:absl/linked_hash_set.adoc[linked&lowbar;hash&lowbar;set]::insert
:relfileprefix: ../../
:mrdocs:

`insert` overloads

== Synopses

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

Inserts the elements from an initializer list&period;


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

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

Inserts an element extracted as a node handle&period;


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

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

Inserts an element into the set&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename K = xref:absl/linked_hash_set/key_type.adoc[key&lowbar;type]&gt;
std::pair&lt;iterator, bool&gt;
xref:absl/linked_hash_set/insert-0a.adoc[insert](xref:absl/linked_hash_set.adoc[key&lowbar;arg&lt;K&gt;] const& k);
----

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

Inserts an element into the set&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename K = xref:absl/linked_hash_set/key_type.adoc[key&lowbar;type],
    K* = nullptr&gt;
std::pair&lt;iterator, bool&gt;
xref:absl/linked_hash_set/insert-0fe.adoc[insert](xref:absl/linked_hash_set.adoc[key&lowbar;arg&lt;K&gt;]&& k);
----

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

Inserts an element extracted as a node handle, using a position hint&period;


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

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

Inserts the elements from the range `&lsqb;first, last)&rsqb;`&period;


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

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

Inserts an element into the set using a position hint&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename K = xref:absl/linked_hash_set/key_type.adoc[key&lowbar;type]&gt;
requires !std&colon;&colon;is&lowbar;convertible&lowbar;v&lt;const key&lowbar;arg&lt;K&gt;&amp;, const&lowbar;iterator&gt; &amp;&amp;
                    !std&colon;&colon;is&lowbar;convertible&lowbar;v&lt;const key&lowbar;arg&lt;K&gt;&amp;, iterator&gt;
xref:absl/linked_hash_set/iterator.adoc[iterator]
xref:absl/linked_hash_set/insert-08.adoc[insert](
    xref:absl/linked_hash_set/const_iterator.adoc[const&lowbar;iterator] hint,
    xref:absl/linked_hash_set.adoc[key&lowbar;arg&lt;K&gt;] const& k);
----

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

Inserts an element into the set using a position hint&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename K = xref:absl/linked_hash_set/key_type.adoc[key&lowbar;type],
    K* = nullptr&gt;
requires !std&colon;&colon;is&lowbar;convertible&lowbar;v&lt;key&lowbar;arg&lt;K&gt;&amp;&amp;, const&lowbar;iterator&gt; &amp;&amp;
                           !std&colon;&colon;is&lowbar;convertible&lowbar;v&lt;key&lowbar;arg&lt;K&gt;&amp;&amp;, iterator&gt;
xref:absl/linked_hash_set/iterator.adoc[iterator]
xref:absl/linked_hash_set/insert-0e.adoc[insert](
    xref:absl/linked_hash_set/const_iterator.adoc[const&lowbar;iterator] hint,
    xref:absl/linked_hash_set.adoc[key&lowbar;arg&lt;K&gt;]&& k);
----

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

== Return Value

* An `insert&lowbar;return&lowbar;type` describing the result&period;
* A pair of an iterator to the element and a bool that is `true` if insertion took 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;
| *node*
| The node handle to insert&period;
| *k*
| 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]#
