[#bsl-deque-0c-insert-07]
= xref:bsl.adoc[bsl]::xref:bsl/deque-0c.adoc[deque]::insert
:relfileprefix: ../../
:mrdocs:

`insert` overloads

== Synopses

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

Insert a move&hyphen;inserted `value` before `position`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/deque-0c/iterator-02.adoc[deque&lt;VALUE&lowbar;TYPE, ALLOCATOR&gt;::iterator]
xref:bsl/deque-0c/insert-0c.adoc[insert](
    xref:bsl/deque-0c/const_iterator.adoc[const&lowbar;iterator] position,
    xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef&lt;value&lowbar;type&gt;] value);
----

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

Insert the elements of `values` before `position`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/deque-0c/iterator-02.adoc[deque&lt;VALUE&lowbar;TYPE, ALLOCATOR&gt;::iterator]
xref:bsl/deque-0c/insert-00.adoc[insert](
    xref:bsl/deque-0c/const_iterator.adoc[const&lowbar;iterator] position,
    std::initializer&lowbar;list&lt;value&lowbar;type&gt; values);
----

[.small]#xref:bsl/deque-0c/insert-00.adoc[_» more&period;&period;&period;_]#

Insert a copy of `value` before `position`&period;


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

[.small]#xref:bsl/deque-0c/insert-08.adoc[_» more&period;&period;&period;_]#

Insert `numElements` copies of `value` before `position`&period;


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

[.small]#xref:bsl/deque-0c/insert-02.adoc[_» more&period;&period;&period;_]#

Insert the range `&lsqb;first, last)&rsqb;` before `position`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class INPUT&lowbar;ITERATOR&gt;
xref:bsl/deque-0c/iterator-02.adoc[deque&lt;VALUE&lowbar;TYPE, ALLOCATOR&gt;::iterator]
xref:bsl/deque-0c/insert-0f.adoc[insert](
    xref:bsl/deque-0c/const_iterator.adoc[const&lowbar;iterator] position,
    INPUT&lowbar;ITERATOR first,
    INPUT&lowbar;ITERATOR last);
----

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

== Return Value

* iterator to the newly inserted element
* iterator to the first inserted element

== Parameters

[cols="1,4"]
|===
| Name| Description
| *position*
| iterator before which to insert
| *value*
| move&hyphen;insertable value to insert
| *values*
| initializer list of elements to insert
| *numElements*
| number of copies to insert
| *first*
| beginning of the range to insert
| *last*
| end of the range to insert
|===


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