erase overloads

Synopses

Declared in <bslstl_unorderedmultiset.h>

Erase the element at position and return the following iterator.

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

Same as the preceding overload, using a transparent key type.

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;

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

Return Value

  • iterator following the erased element

  • number of elements erased

  • last

Parameters

Name

Description

position

iterator to the element to erase

key

key value of elements to erase

first

beginning of the erase range

last

end of the erase range (one past last)

Created with MrDocs