[#bsl-list-054-erase-0e]
= xref:bsl.adoc[bsl]::xref:bsl/list-054.adoc[list]::erase
:relfileprefix: ../../
:mrdocs:

`erase` overloads

== Synopses

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

Remove the element at `position` and return an iterator to the next&period;


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

[.small]#xref:bsl/list-054/erase-02.adoc[_» more&period;&period;&period;_]#

Remove the elements in the half&hyphen;open range `&lsqb;dstBegin &period;&period; dstEnd)&rsqb;`&period;


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

[.small]#xref:bsl/list-054/erase-07.adoc[_» more&period;&period;&period;_]#

== Return Value

* iterator to the element following the erased element
* iterator to the element following the last erased element

== Parameters

[cols="1,4"]
|===
| Name| Description
| *position*
| iterator to the element to remove
| *dstBegin*
| iterator to the first element to remove
| *dstEnd*
| iterator past the last element to remove
|===


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