[#bsl-list-054-erase-0e] = xref:bsl.adoc[bsl]::xref:bsl/list-054.adoc[list]::erase :relfileprefix: ../../ :mrdocs: `erase` overloads == Synopses Declared in `<bslstl_list.h>` Remove from this list the element at the specified `position`, and return an iterator providing modifiable access to the element immediately following the removed element, or to the position returned by the `end` method if the removed element was the last in the sequence. The behavior is undefined unless `position` refers to an element in this list. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/list-054/iterator.adoc[list<VALUE, ALLOCATOR>::iterator] xref:bsl/list-054/erase-02.adoc[erase](xref:bsl/list-054/const_iterator.adoc[const_iterator] position); ---- [.small]#xref:bsl/list-054/erase-02.adoc[_» more..._]# Remove from this list the elements starting at the specified `dstBegin` position up to, but not including, the specified `dstEnd` position, and 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. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/list-054/iterator.adoc[list<VALUE, ALLOCATOR>::iterator] xref:bsl/list-054/erase-07.adoc[erase]( xref:bsl/list-054/const_iterator.adoc[const_iterator] dstBegin, xref:bsl/list-054/const_iterator.adoc[const_iterator] dstEnd); ---- [.small]#xref:bsl/list-054/erase-07.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#