[#bsl-vector-086-insert-02]
= xref:bsl.adoc[bsl]::xref:bsl/vector-086.adoc[vector&lt;VALUE&lowbar;TYPE*, ALLOCATOR&gt;]::insert
:relfileprefix: ../../
:mrdocs:

Insert elements into this vector&period;

== Synopses

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

Insert elements into this vector&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/vector-086/iterator.adoc[vector&lt;VALUE&lowbar;TYPE*, ALLOCATOR&gt;::iterator]
xref:bsl/vector-086/insert-06.adoc[insert](
    xref:bsl/vector-086/const_iterator.adoc[const&lowbar;iterator] position,
    std::initializer&lowbar;list&lt;VALUE&lowbar;TYPE*&gt; values);
----

[.small]#xref:bsl/vector-086/insert-06.adoc[_» more&period;&period;&period;_]#

Insert elements into this vector&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/vector-086/iterator.adoc[vector&lt;VALUE&lowbar;TYPE*, ALLOCATOR&gt;::iterator]
xref:bsl/vector-086/insert-0d.adoc[insert](
    xref:bsl/vector-086/const_iterator.adoc[const&lowbar;iterator] position,
    VALUE&lowbar;TYPE* value);
----

[.small]#xref:bsl/vector-086/insert-0d.adoc[_» more&period;&period;&period;_]#

Insert elements into this vector&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/vector-086/iterator.adoc[vector&lt;VALUE&lowbar;TYPE*, ALLOCATOR&gt;::iterator]
xref:bsl/vector-086/insert-0f.adoc[insert](
    xref:bsl/vector-086/const_iterator.adoc[const&lowbar;iterator] position,
    xref:bsl/vector-086/size_type.adoc[size&lowbar;type] numElements,
    VALUE&lowbar;TYPE* value);
----

[.small]#xref:bsl/vector-086/insert-0f.adoc[_» more&period;&period;&period;_]#

Insert elements into this vector&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class INPUT&lowbar;ITER&gt;
xref:bsl/vector-086/iterator.adoc[iterator]
xref:bsl/vector-086/insert-03.adoc[insert](
    xref:bsl/vector-086/const_iterator.adoc[const&lowbar;iterator] position,
    INPUT&lowbar;ITER first,
    INPUT&lowbar;ITER last);
----

[.small]#xref:bsl/vector-086/insert-03.adoc[_» more&period;&period;&period;_]#

== Return Value

iterator referring to the first newly inserted element, or `position` if none

== Parameters

[cols="1,4"]
|===
| Name| Description
| *position*
| element position or insertion point
| *values*
| initializer list of elements
| *value*
| element value
| *numElements*
| number of elements to insert or assign
| *first*
| beginning of the range (inclusive)
| *last*
| end of the range (exclusive)
|===


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