[#bsl-unordered_map-02b-erase-06] = xref:bsl.adoc[bsl]::xref:bsl/unordered_map-02b.adoc[unordered_map]::erase :relfileprefix: ../../ :mrdocs: Erase the elements in the half‐open range `[first, last)]`. == Synopsis Declared in `<bslstl_unorderedmap.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/unordered_map-02b/iterator.adoc[iterator] erase( xref:bsl/unordered_map-02b/const_iterator.adoc[const_iterator] first, xref:bsl/unordered_map-02b/const_iterator.adoc[const_iterator] last); ---- == Description Remove from this unordered map the `value_type` objects starting at the specified `first` position up to, but not 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, and preserves the relative order of the elements not removed. The behavior is undefined unless `first` and `last` either refer to elements in this unordered map or are the `end` iterator, and the `first` position is at or before the `last` position in the iteration sequence provided by this container. == Return Value `last` == Parameters [cols="1,4"] |=== | Name| Description | *first* | start of the range | *last* | end of the range (one past last) |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#