Return the number of elements with the specified key.

Synopsis

Declared in <bslstl_unorderedmap.h>

size_type
count(key_type const& key) const;

Description

Return the number of value_type objects contained within this unordered map having the specified key. Note that since an unordered map maintains unique keys, the returned value will be either 0 or 1.

Return Value

0 or 1

Parameters

Name

Description

key

key to look up

Created with MrDocs