[#bsl-deque-0c-insert-02] = xref:bsl.adoc[bsl]::xref:bsl/deque-0c.adoc[deque]::insert :relfileprefix: ../../ :mrdocs: Insert `numElements` copies of `value` before `position`. == Synopsis Declared in `<bslstl_deque.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/deque-0c/iterator-02.adoc[deque<VALUE_TYPE, ALLOCATOR>::iterator] insert( xref:bsl/deque-0c/const_iterator.adoc[const_iterator] position, xref:bsl/deque-0c/size_type.adoc[size_type] numElements, VALUE_TYPE const& value); ---- == Description Insert at the specified `position` in this deque the specified `numElements` copies of the specified `value`, and return an iterator providing modifiable access to the first element in the newly inserted sequence of elements. This method offers full guarantee of rollback in case an exception is thrown other than by the `VALUE_TYPE` copy constructor or assignment operator. This method requires that the (template parameter) `VALUE_TYPE` be `copy‐insertable` into this deque (see {Requirements on `VALUE_TYPE`}). The behavior is undefined unless `position` is an iterator in the range `[cbegin() .. cend()]` (both endpoints included). == Return Value iterator to the first inserted element == Parameters [cols="1,4"] |=== | Name| Description | *position* | iterator before which to insert | *numElements* | number of copies to insert | *value* | value to copy‐insert |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#