[#bsl-multimap-0ae-erase-039] = xref:bsl.adoc[bsl]::xref:bsl/multimap-0ae.adoc[multimap]::erase :relfileprefix: ../../ :mrdocs: `erase` overloads == Synopses Declared in `<bslstl_multimap.h>` Remove from this multimap 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 multimap. This method invalidates only iterators and references to the removed element and previously saved values of the `end()` iterator. The behavior is undefined unless `position` refers to a `value_type` object in this multimap. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/multimap-0ae/iterator.adoc[multimap<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator] xref:bsl/multimap-0ae/erase-0cd.adoc[erase](xref:bsl/multimap-0ae/const_iterator.adoc[const_iterator] position); ---- [.small]#xref:bsl/multimap-0ae/erase-0cd.adoc[_» more..._]# Remove from this multimap 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 multimap. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/multimap-0ae/iterator.adoc[multimap<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator] xref:bsl/multimap-0ae/erase-0e.adoc[erase](xref:bsl/multimap-0ae/iterator.adoc[iterator] position); ---- [.small]#xref:bsl/multimap-0ae/erase-0e.adoc[_» more..._]# Remove from this multimap all `value_type` objects whose keys are equivalent to the specified `key`, if such entries exist, and return the number of erased objects; otherwise, if there is no `value_type` objects having an equivalent key, 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. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/multimap-0ae/size_type.adoc[multimap<KEY, VALUE, COMPARATOR, ALLOCATOR>::size_type] xref:bsl/multimap-0ae/erase-03d.adoc[erase](xref:bsl/multimap-0ae/key_type.adoc[key_type] const& key); ---- [.small]#xref:bsl/multimap-0ae/erase-03d.adoc[_» more..._]# Remove all elements whose keys compare equivalent to the specified transparent `key`, and return the number of elements erased. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class t_KEY> xref:bsl/multimap-0ae/size_type.adoc[size_type] xref:bsl/multimap-0ae/erase-0c5.adoc[erase](t_KEY&& key) requires BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR, 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/multimap-0ae/erase-0c5.adoc[_» more..._]# Remove from this multimap 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 multimap or are the `end` iterator, and the `first` position is at or before the `last` position in the ordered sequence provided by this container. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/multimap-0ae/iterator.adoc[multimap<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator] xref:bsl/multimap-0ae/erase-04.adoc[erase]( xref:bsl/multimap-0ae/const_iterator.adoc[const_iterator] first, xref:bsl/multimap-0ae/const_iterator.adoc[const_iterator] last); ---- [.small]#xref:bsl/multimap-0ae/erase-04.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#