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

Insert at the specified `position` in this deque the values in the range starting at the specified `first` and ending immediately before the specified `last` iterators of the (template parameter) type `INPUT&lowbar;ITERATOR`, and return an iterator providing modifiable access to the first element in the newly inserted sequence of elements&period; This method offers full guarantee of rollback in case an exception is thrown other than by the `VALUE&lowbar;TYPE` copy constructor or assignment operator&period; The (template parameter) type `INPUT&lowbar;ITERATOR` shall meet the requirements of an input iterator defined in the C&plus;&plus;11 standard &lsqb;input&period;iterators&rsqb;providing access to values of a type convertible to `value&lowbar;type`, and `value&lowbar;type` must be `emplace&hyphen;constructible` from `&ast;i` into this deque, where `i` is a dereferenceable iterator in the range `&lsqb;first &period;&period; last)&rsqb;` (see &lcub;Requirements on `VALUE&lowbar;TYPE`&rcub;)&period; The behavior is undefined unless `position` is an iterator in the range `&lsqb;cbegin() &period;&period; cend()&rsqb;` (both endpoints included), and `first` and `last` refer to a sequence of valid values where `first` is at a position at or before `last`&period;

== Synopsis

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

[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]
insert(
    xref:bsl/deque-0c/const_iterator.adoc[const&lowbar;iterator] position,
    INPUT&lowbar;ITERATOR first,
    INPUT&lowbar;ITERATOR last);
----


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