Return the number of elements equivalent to key.
Synopsis
Declared in <bslstl_set.h>
template<class LOOKUP_KEY>
size_type
count(LOOKUP_KEY const& key) const
requires BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
LOOKUP_KEY>::value;
Description
Note that although a set maintains unique keys, the returned value can be other than 0 or 1, because a transparent comparator may have been supplied that provides a different (but compatible) partitioning of keys for LOOKUP_KEY as the comparisons used to order the keys in the set.
Note: implemented inline due to Sun CC compilation error.
Return Value
number of elements equivalent to key
Parameters
Name |
Description |
key |
key value to look up |
Created with MrDocs