bsl::unordered_set::count

Return the number of elements equivalent to key.

Synopsis

Declared in <bslstl_unorderedset.h>

unordered_set<KEY, HASH, EQUAL, ALLOCATOR>::size_type
count(key_type const& key) const;

Description

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

Return Value

0 or 1

Parameters

NameDescription
keykey value to look up