xtd 0.2.0
Loading...
Searching...
No Matches

◆ insert() [4/6]

template<typename type_t , typename allocator_t = xtd::collections::generic::helpers::allocator<typename std::conditional<std::is_same<bool, type_t>::value, char, type_t>::type>>
template<typename input_iterator_t >
iterator xtd::collections::generic::list< type_t, allocator_t >::insert ( const_iterator  pos,
input_iterator_t  first,
input_iterator_t  last 
)
inline

Inserts elements at the specified location in the container.

Parameters
firstThe first range of elements to insert, cannot be iterators into container for which insert is called
lastThe last range of elements to insert, cannot be iterators into container for which insert is called
Returns
The iterator pointing to the first element inserted, or pos if first == last.
Remarks
Inserts elements from range [first, last) before pos.
If first and last are iterators into *this, the behavior is undefined.
If after the operation the new xtd::collections::generic::list::size() is greater than old xtd::collections::generic::list::capacity() a reallocation takes place, in which case all iterators (including the xtd::collections::generic::list::end() iterator) and all references to the elements are invalidated. Otherwise, only the iterators and references before the insertion point remain valid.