[#bsl-multimap-0ae-erase-03d] = xref:bsl.adoc[bsl]::xref:bsl/multimap-0ae.adoc[multimap]::erase :relfileprefix: ../../ :mrdocs: 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. == Synopsis Declared in `<bslstl_multimap.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/multimap-0ae/size_type.adoc[multimap<KEY, VALUE, COMPARATOR, ALLOCATOR>::size_type] erase(xref:bsl/multimap-0ae/key_type.adoc[key_type] const& key); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#