nlohmann::ordered_map::count

returns the number of elements matching the given key

Synopses

Declared in <nlohmann/ordered_map.hpp>

returns the number of elements matching the given key

size_type
count(key_type const& key) const;
» more...

returns the number of elements matching the given key

template<class KeyType>
requires detail::is_usable_as_key_type<key_compare, key_type, KeyType>::value
size_type
count(KeyType&& key) const;
» more...

Return Value

1 if an element with the key exists, 0 otherwise

Parameters

NameDescription
key [in]key to count