Namespaces
Variants
Views
Actions

std::forward_list<T,Allocator>::erase_after

From cppreference.com
< cpp‎ | container‎ | forward list
Revision as of 14:13, 2 August 2011 by P12bot (Talk | contribs)

Template:cpp/container/forward list/sidebar Template:ddcl list begin <tr class="t-dcl ">

<td >
iterator erase_after( const_iterator position );
</td>

<td > (1) </td> <td > Template:mark c++0x feature </td> </tr> <tr class="t-dcl ">

<td >
iterator erase_after( const_iterator first, const_iterator last );
</td>

<td > (2) </td> <td > Template:mark c++0x feature </td> </tr> Template:ddcl list end

Removes specified elements from the container.

1) Removes the element following pos.

2) Removes the elements in the range (first; last).

Template:params

pos - iterator to the element preceding the element to remove
first, last - range of elements to remove

Template:returns

1) iterator to the element following the erased one, or end() if no such element exists.

2) last

Template:example cpp

Template:complex

1) Template:complex constant.

2) linear in distance between first and last.

See also

Template:cpp/container/dcl list clear