[#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&hyphen;`const` iterator equivalent to `dstEnd`&period; The behavior is undefined unless `dstBegin` is an iterator in the range `&lsqb;begin() &period;&period; end()&rsqb;` and `dstEnd` is an iterator in the range `&lsqb;dstBegin &period;&period; end()&rsqb;` (both endpoints included)&period; Note that `dstBegin` may be equal to `dstEnd`, in which case the list is not modified&period;

== Synopsis

Declared in `&lt;bslstl&lowbar;list&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/list-054/iterator.adoc[list&lt;VALUE, ALLOCATOR&gt;::iterator]
erase(
    xref:bsl/list-054/const_iterator.adoc[const&lowbar;iterator] dstBegin,
    xref:bsl/list-054/const_iterator.adoc[const&lowbar;iterator] dstEnd);
----


[.small]#Created with https://www.mrdocs.com[MrDocs]#
