[#bsl-list-054-erase-07] = xref:bsl.adoc[bsl]::xref:bsl/list-054.adoc[list]::erase :relfileprefix: ../../ :mrdocs: 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. == Synopsis Declared in `<bslstl_list.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/list-054/iterator.adoc[list<VALUE, ALLOCATOR>::iterator] erase( xref:bsl/list-054/const_iterator.adoc[const_iterator] dstBegin, xref:bsl/list-054/const_iterator.adoc[const_iterator] dstEnd); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#