[#bsl-unordered_map-0bf-erase-06] = xref:bsl.adoc[bsl]::xref:bsl/unordered_map-0bf.adoc[unordered_map<basic_string<char>, Json, TransparentHash, TransparentEqualTo>]::erase :relfileprefix: ../../ :mrdocs: `erase` overloads == Synopses Declared in `<bslstl_unorderedmap.h>` Remove from this unordered map the `value_type` object at the specified `position`, and return an iterator referring to the element immediately following the removed element, or to the past‐the‐end position if the removed element was the last element in the sequence of elements maintained by this unordered map. 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 `position` refers to a `value_type` object in this unordered map. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/unordered_map-0bf/iterator.adoc[iterator] xref:bsl/unordered_map-0bf/erase-05.adoc[erase](xref:bsl/unordered_map-0bf/const_iterator.adoc[const_iterator] position); ---- [.small]#xref:bsl/unordered_map-0bf/erase-05.adoc[_» more..._]# Remove from this unordered map the `value_type` object at the specified `position`, and return an iterator referring to the element immediately following the removed element. The behavior is undefined unless `position` refers to a `value_type` object in this unordered map. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/unordered_map-0bf/iterator.adoc[iterator] xref:bsl/unordered_map-0bf/erase-02.adoc[erase](xref:bsl/unordered_map-0bf/iterator.adoc[iterator] position); ---- [.small]#xref:bsl/unordered_map-0bf/erase-02.adoc[_» more..._]# Remove from this unordered map the `value_type` object having the specified `key`, if it exists, and return 1; otherwise (there is no object with a key equivalent to `key` in this unordered map) return 0 with no other effect. 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. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/unordered_map-0bf/size_type.adoc[size_type] xref:bsl/unordered_map-0bf/erase-0e.adoc[erase](xref:bsl/unordered_map-0bf/key_type.adoc[key_type] const& key); ---- [.small]#xref:bsl/unordered_map-0bf/erase-0e.adoc[_» more..._]# Remove from this unordered map the `value_type` object having a key equivalent to the specified `key`, if it exists, and return 1; otherwise return 0 with no other effect. This overload participates in overload resolution only when the hasher and comparator are transparent. 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. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class t_KEY> xref:bsl/unordered_map-0bf/size_type.adoc[size_type] xref:bsl/unordered_map-0bf/erase-09.adoc[erase](t_KEY&& key) requires BloombergLP::bslmf::IsTransparentPredicate<HASH, t_KEY>::value && BloombergLP::bslmf::IsTransparentPredicate<EQUAL,t_KEY>::value && !is_convertible<BSLS_COMPILERFEATURES_FORWARD_REF(t_KEY), iterator>::value && !is_convertible<BSLS_COMPILERFEATURES_FORWARD_REF(t_KEY), const_iterator>::value; ---- [.small]#xref:bsl/unordered_map-0bf/erase-09.adoc[_» more..._]# 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. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/unordered_map-0bf/iterator.adoc[iterator] xref:bsl/unordered_map-0bf/erase-03.adoc[erase]( xref:bsl/unordered_map-0bf/const_iterator.adoc[const_iterator] first, xref:bsl/unordered_map-0bf/const_iterator.adoc[const_iterator] last); ---- [.small]#xref:bsl/unordered_map-0bf/erase-03.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#