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

◆ erase() [2/2]

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 >::erase ( const_iterator  first,
const_iterator  last 
)
inlinevirtual

Erases the specified elements from the container.

Parameters
posThe iterator to the element to remove.
Returns
Iterator following the last removed element.
Remarks
Removes the elements in the range [first, last).
Iterators (including the xtd::collections::generic::list::end() iterator) and references to the elements at or after the point of the erase are invalidated.
The iterator first does not need to be dereferenceable if first == last: erasing an empty range is a no-op.
If last == end() prior to removal, then the updated xtd::collections::generic::list::end() iterator is returned.
If [first, last) is an empty range, then last is returned.