Return an iterator range of elements with an equivalent key.

Synopsis

Declared in <bslstl_unorderedmap.h>

template<class LOOKUP_KEY>
pair<iterator, iterator>
equal_range(LOOKUP_KEY const& key)
requires BloombergLP::bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value
        && BloombergLP::bslmf::IsTransparentPredicate<EQUAL,LOOKUP_KEY>::value;

Description

Return a pair of iterators providing modifiable access to the sequence of value_type objects in this unordered map having the specified key, where the first iterator is positioned at the start of the sequence, and the second is positioned one past the end of the sequence. If this unordered map contains no value_type object having key, then the two returned iterators will have the same value, end(). The behavior is undefined unless key is equivalent to at most one key in this unordered map. Note that since an unordered map maintains unique keys, the range will contain at most one element.

Note: implemented inline due to Sun CC compilation error.

Return Value

pair of iterators delimiting the equal‐key range

Parameters

Name

Description

key

key to look up

Created with MrDocs