bsl::list::insert

Insert at the specified dstPosition in this list the specified move-insertable value, and 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).

Synopsis

Declared in <bslstl_list.h>

list<VALUE, ALLOCATOR>::iterator
insert(
    const_iterator dstPosition,
    BloombergLP::bslmf::MovableRef<value_type> value);