erase overloads

Synopses

Declared in <bslstl_unorderedmap.h>

Erase the element at position.

Erase the element at position.

iterator
erase(iterator position);

Erase the element with the specified key, if present.

size_type
erase(key_type const& key);

Erase the element with an equivalent key, if present.

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 elements in the half‐open range [first, last)].

Return Value

  • iterator following the erased element

  • 1 if erased, otherwise 0

  • last

Parameters

Name

Description

position

iterator to the element to erase

key

key to look up

first

start of the range

last

end of the range (one past last)

Created with MrDocs