[#absl-InlinedVector-insert-08]
= xref:absl.adoc[absl]::xref:absl/InlinedVector.adoc[InlinedVector]::insert
:relfileprefix: ../../
:mrdocs:

`insert` overloads

== Synopses

Declared in `&lt;absl&sol;container&sol;inlined&lowbar;vector&period;h&gt;`

Inserts a copy of `v` at `pos`, returning an `iterator` to the newly inserted element&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:absl/InlinedVector/iterator.adoc[iterator]
xref:absl/InlinedVector/insert-07.adoc[insert](
    xref:absl/InlinedVector/const_iterator.adoc[const&lowbar;iterator] pos,
    xref:absl/InlinedVector/const_reference.adoc[const&lowbar;reference] v);
----

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

Overload of `InlinedVector&colon;&colon;insert(&period;&period;&period;)` that inserts copies of the elements of `list` starting at `pos`, returning an `iterator` pointing to the first of the newly inserted elements&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:absl/InlinedVector/iterator.adoc[iterator]
xref:absl/InlinedVector/insert-00.adoc[insert](
    xref:absl/InlinedVector/const_iterator.adoc[const&lowbar;iterator] pos,
    std::initializer&lowbar;list&lt;value&lowbar;type&gt; list);
----

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

Overload of `InlinedVector&colon;&colon;insert(&period;&period;&period;)` that inserts `v` at `pos` using move semantics, returning an `iterator` to the newly inserted element&period;


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

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

Overload of `InlinedVector&colon;&colon;insert(&period;&period;&period;)` that inserts `n` contiguous copies of `v` starting at `pos`, returning an `iterator` pointing to the first of the newly inserted elements&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:absl/InlinedVector/iterator.adoc[iterator]
xref:absl/InlinedVector/insert-0ae.adoc[insert](
    xref:absl/InlinedVector/const_iterator.adoc[const&lowbar;iterator] pos,
    xref:absl/InlinedVector/size_type.adoc[size&lowbar;type] n,
    xref:absl/InlinedVector/const_reference.adoc[const&lowbar;reference] v);
----

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

Overload of `InlinedVector&colon;&colon;insert(&period;&period;&period;)` that inserts the range &lsqb;`first`,&rsqb; `last`) starting at `pos`, returning an `iterator` pointing to the first of the newly inserted elements&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename ForwardIterator,
    xref:absl/InlinedVector.adoc[EnableIfAtLeastForwardIterator&lt;ForwardIterator&gt;] = 0&gt;
xref:absl/InlinedVector/iterator.adoc[iterator]
xref:absl/InlinedVector/insert-0f.adoc[insert](
    xref:absl/InlinedVector/const_iterator.adoc[const&lowbar;iterator] pos,
    ForwardIterator first,
    ForwardIterator last);
----

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

Overload of `InlinedVector&colon;&colon;insert(&period;&period;&period;)` that inserts the range &lsqb;`first`,&rsqb; `last`) starting at `pos`, returning an `iterator` pointing to the first of the newly inserted elements&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename InputIterator,
    xref:absl/InlinedVector.adoc[DisableIfAtLeastForwardIterator&lt;InputIterator&gt;] = 0&gt;
xref:absl/InlinedVector/iterator.adoc[iterator]
xref:absl/InlinedVector/insert-02.adoc[insert](
    xref:absl/InlinedVector/const_iterator.adoc[const&lowbar;iterator] pos,
    InputIterator first,
    InputIterator last);
----

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

Overload of `InlinedVector&colon;&colon;insert(&period;&period;&period;)` that inserts the range &lsqb;`first`,&rsqb; `last`) starting at `pos`, returning an `iterator` pointing to the first of the newly inserted elements&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename InputIterator,
    xref:absl/InlinedVector.adoc[DisableIfAtLeastForwardIterator&lt;InputIterator&gt;] = 0&gt;
xref:absl/InlinedVector/iterator.adoc[iterator]
xref:absl/InlinedVector/insert-0c.adoc[insert](
    xref:absl/InlinedVector/const_iterator.adoc[const&lowbar;iterator] pos,
    InputIterator first,
    InputIterator last);
----

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

== Return Value

* An `iterator` to the newly inserted element&period;
* An `iterator` to the first newly inserted element&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *pos*
| The position at which to insert&period;
| *v*
| The value to copy&period;
| *list*
| The initializer list to copy elements from&period;
| *n*
| The number of copies to insert&period;
| *first*
| An iterator to the beginning of the range&period;
| *last*
| An iterator past the end of the range&period;
|===


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