[#bsl-set-0d-erase-0e] = xref:bsl.adoc[bsl]::xref:bsl/set-0d.adoc[set]::erase :relfileprefix: ../../ :mrdocs: Remove from this set the `value_type` objects starting at the specified `first` position up to, but including the specified `last` position, and return `last`. This method invalidates only iterators and references to the removed element and previously saved values of the `end()` iterator. 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 ordered sequence provided by this container. == Synopsis Declared in `<bslstl_set.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/set-0d/iterator.adoc[set<KEY, COMPARATOR, ALLOCATOR>::iterator] erase( xref:bsl/set-0d/const_iterator.adoc[const_iterator] first, xref:bsl/set-0d/const_iterator.adoc[const_iterator] last); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#