std::multiset::count(3)
β¨ std::multiset::count(3) β¨
Okay bestie, welcome to the C++ Standard Libary corner of the group chat π«Ά. Manual name: C++ Standard Libary. This page is literally std::multiset::count(3) β let's get into it π
.
πΈ NAME πΈ
std::multiset::count β std::multiset::count π
π Synopsis π
size_type count( const Key& key ) const; (1)
template< class K > (2) (since C++14)
size_type count( const K& x ) const;
Returns the number of elements with key that compares equivalent to the specified argument. No cap β¨.
- Returns the number of elements with key
key. - Returns the number of elements with key that compares equivalent to the value
x.
This overload participates in overload resolution only if the qualified-id Compare::is_transparent is valid and denotes a type. It allows calling this function without constructing an instance of Key. That's the whole vibe check π¦.
π§Έ Parameters π§Έ
keyβ key value of the elements to countxβ alternative value to compare to the keys
π Return value π
Number of elements with key that compares equivalent to key or x. Periodt π
.
π₯ Complexity π₯
Logarithmic in the size of the container plus linear in the number of elements found. It's giving "log plus linear," bestie π.
π Notes π
Feature-test macro tea β:
- Feature-test macro:
__cpp_lib_generic_associative_lookup - Value:
201304L - Std:
(C++14) - Feature: Heterogeneous comparison lookup in associative containers; overload (2)
π¦ Example π¦
This section is incomplete. Reason: no example π. It's literally incomplete, bestie.
π See also π
findβ finds element with specific key (public member function)equal_rangeβ returns range of elements matching a specific key (public member function)
π·οΈ Category π·οΈ
* Todo no example
Fresh from http://cppreference.com, version/date 2024.06.10, page std::multiset::count(3) β mwah, bye bestie ππ
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms