[#bsl-set-0d-erase-0b]
= xref:bsl.adoc[bsl]::xref:bsl/set-0d.adoc[set]::erase
:relfileprefix: ../../
:mrdocs:

Remove from this set the `value&lowbar;type` object at the specified `position`, and return an iterator referring to the element immediately following the removed element, or to the past&hyphen;the&hyphen;end position if the removed element was the last element in the sequence of elements maintained by this set&period; This method invalidates only iterators and references to the removed element and previously saved values of the `end()` iterator&period; The behavior is undefined unless `position` refers to a `value&lowbar;type` object in this set&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/set-0d/iterator.adoc[set&lt;KEY, COMPARATOR, ALLOCATOR&gt;::iterator]
erase(xref:bsl/set-0d/const_iterator.adoc[const&lowbar;iterator] position);
----


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