[#bsl-unordered_set-0d2d-erase-080]
= xref:bsl.adoc[bsl]::xref:bsl/unordered_set-0d2d.adoc[unordered&lowbar;set]::erase
:relfileprefix: ../../
:mrdocs:

Remove from this set the `value&lowbar;type` objects starting at the specified `first` position up to, but including the specified `last` position, and return `last`&period; This method invalidates only iterators and references to the removed element and previously saved values of the `end()` iterator, and preserves the relative order of the elements not removed&period; The behavior is undefined unless `first` and `last` either refer to elements in this set or are the `end` iterator, and the `first` position is at or before the `last` position in the sequence provided by this container&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/unordered_set-0d2d/iterator.adoc[unordered&lowbar;set&lt;KEY, HASH, EQUAL, ALLOCATOR&gt;::iterator]
erase(
    xref:bsl/unordered_set-0d2d/const_iterator.adoc[const&lowbar;iterator] first,
    xref:bsl/unordered_set-0d2d/const_iterator.adoc[const&lowbar;iterator] last);
----


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