Erase all elements with key equivalent to key and return the count.
Declared in <bslstl_unorderedmultimap.h>
unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::size_type
erase(key_type const& key);
Remove from this unordered multimap all value_type objects with a key equivalent to the specified key, if such exist, and return the number of objects erased; otherwise, if there are no value_type objects with a key equivalent to 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, and preserves the relative order of the elements not removed.
number of elements erased
| Name | Description |
|---|---|
| key | key value of elements to erase |