Remove the elements in the half-open range [dstBegin .. dstEnd)].
Declared in <bslstl_list.h>
list<VALUE, ALLOCATOR>::iterator
erase(
const_iterator dstBegin,
const_iterator dstEnd);
Return a non-const iterator equivalent to dstEnd. The behavior is undefined unless dstBegin is an iterator in the range [begin() .. end()] and dstEnd is an iterator in the range [dstBegin .. end()] (both endpoints included). Note that dstBegin may be equal to dstEnd, in which case the list is not modified.
iterator to the element following the last erased element
| Name | Description |
|---|---|
| dstBegin | iterator to the first element to remove |
| dstEnd | iterator past the last element to remove |