Return the number of elements equivalent to key.

Synopsis

Declared in <bslstl_map.h>

size_type
count(key_type const& key) const;

Description

Return the number of value_type objects within this map whose keys are equivalent to the specified key. Note that since a map maintains unique keys, the returned value will be either 0 or 1.

Return Value

0 or 1, since keys are unique

Parameters

Name

Description

key

key value to count

Created with MrDocs