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

Remove the element at `position` and return an iterator to the next&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] position);
----

== Description

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&period; The behavior is undefined unless `position` refers to an element in this list&period;

== Return Value

iterator to the element following the erased element

== Parameters

[cols="1,4"]
|===
| Name| Description
| *position*
| iterator to the element to remove
|===


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