[#bsl-list-054-insert-0c] = xref:bsl.adoc[bsl]::xref:bsl/list-054.adoc[list]::insert :relfileprefix: ../../ :mrdocs: Insert the move‐insertable `value` at `dstPosition`. == Synopsis Declared in `<bslstl_list.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/list-054/iterator.adoc[list<VALUE, ALLOCATOR>::iterator] insert( xref:bsl/list-054/const_iterator.adoc[const_iterator] dstPosition, xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef<value_type>] value); ---- == Description Return an iterator providing modifiable access to the newly inserted element. `value` is left in a valid but unspecified state. If an exception is thrown (other than by the copy constructor, move constructor, assignment operator, or move assignment operator of `value_type`), this method has no effect. This method requires that the (template parameter) `VALUE` be `move‐insertable` into this list (see {Requirements on `VALUE`}). The behavior is undefined unless `dstPosition` is an iterator in the range `[cbegin() .. cend()]` (both endpoints included). == Return Value iterator to the newly inserted element == Parameters [cols="1,4"] |=== | Name| Description | *dstPosition* | location before which the element is inserted | *value* | element to move‐insert |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#