Insert the values in [first .. last)] at the specified dstPosition.
Declared in <bslstl_list.h>
template<class INPUT_ITERATOR>
iterator
insert(
const_iterator dstPosition,
INPUT_ITERATOR first,
INPUT_ITERATOR last)
requires !is_arithmetic<INPUT_ITERATOR>::value &&
!is_enum<INPUT_ITERATOR>::value;
Return an iterator providing modifiable access to the first element in the newly inserted sequence of elements. The (template parameter) type INPUT_ITERATOR shall meet the requirements of an input iterator defined in the C++11 standard [input.iterators] providing access to values of a type convertible to value_type, and value_type must be emplace-constructible from *i into this list, where i is a dereferenceable iterator in the range [first .. last)] (see {Requirements on VALUE}). The behavior is undefined unless dstPosition is an iterator in the range [cbegin() .. cend()] (both endpoints included), and first and last refer to a sequence of valid values where first is at a position at or before last.
iterator to the first inserted element, or dstPosition if empty
| Name | Description |
|---|---|
| dstPosition | location before which elements are inserted |
| first | start of the iterator range |
| last | one past the end of the iterator range |