bsl::unordered_multimap::erase

erase overloads

Synopses

Declared in <bslstl_unorderedmultimap.h>

Erase the element at position and return the following iterator.

unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::iterator
erase(const_iterator position);
» more...

Erase the element at position and return the following iterator.

unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::iterator
erase(iterator position);
» more...

Erase all elements with key equivalent to key and return the count.

unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::size_type
erase(key_type const& key);
» more...

Erase all elements with key equivalent to key and return the count.

template<class t_KEY>
size_type
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;
» more...

Erase the half-open range [first, last)] and return last.

unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::iterator
erase(
    const_iterator first,
    const_iterator last);
» more...

Return Value

  • iterator following the erased element
  • number of elements erased
  • last

Parameters

NameDescription
positioniterator to the element to erase
keykey value of elements to erase
firstbeginning of the erase range
lastend of the erase range (one past last)