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

◆ insert() [3/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>>
virtual iterator xtd::collections::generic::list< type_t, allocator_t >::insert ( const_iterator  pos,
size_type  count,
const type_t &  value 
)
inlinevirtual

Inserts elements at the specified location in the container.

Parameters
posthe iterator before which the content will be inserted (pos may be the end() iterator).
countThe number of elements to insert.
valueThe element value to insert.
Returns
The iterator pointing to the first element inserted, or pos if count == 0.
Remarks
Iterator pointing to the first element inserted, or pos if count == 0.
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.