[#bsl-vector-09a-insert-04]
= xref:bsl.adoc[bsl]::xref:bsl/vector-09a.adoc[vector&lt;int&gt;]::insert
:relfileprefix: ../../
:mrdocs:

Insert at the specified `position` in this vector the specified move&hyphen;insertable `value`, and return an iterator referring to the newly inserted element&period; `value` is left in a valid but unspecified state&period; If an exception is thrown (other than by the copy constructor, move constructor, assignment operator, or move assignment operator of `VALUE&lowbar;TYPE`), `this` is unaffected&period; Throw `std&colon;&colon;length&lowbar;error` if `size() &equals;&equals; max&lowbar;size()`&period; The behavior is undefined unless `position` is an iterator in the range `&lsqb;begin() &period;&period; end()&rsqb;` (both endpoints included)&period; This method requires that the (template parameter) type `VALUE&lowbar;TYPE` be `move&hyphen;insertable` into this vector (see &lcub;Requirements on `VALUE&lowbar;TYPE`&rcub;)&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/vector-09a/iterator.adoc[iterator]
insert(
    xref:bsl/vector-09a/const_iterator.adoc[const&lowbar;iterator] position,
    xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef&lt;int&gt;] value);
----


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