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

◆ erase() [1/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  pos)
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 element at pos.
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 pos must be valid and dereferenceable. Thus the xtd::collections::generic::list::end() iterator (which is valid, but is not dereferenceable) cannot be used as a value for pos. @remarks Ifpos` refers to the last element, then thextd::collections::generic::list:: end() iterator is returned.