bsl::list::erase

erase overloads

Synopses

Declared in <bslstl_list.h>

Remove the element at position and return an iterator to the next.

list<VALUE, ALLOCATOR>::iterator
erase(const_iterator position);
» more...

Remove the elements in the half-open range [dstBegin .. dstEnd)].

list<VALUE, ALLOCATOR>::iterator
erase(
    const_iterator dstBegin,
    const_iterator dstEnd);
» more...

Return Value

  • iterator to the element following the erased element
  • iterator to the element following the last erased element

Parameters

NameDescription
positioniterator to the element to remove
dstBeginiterator to the first element to remove
dstEnditerator past the last element to remove