std::flat_multiset::count(3)
πΈ NAME πΈ
Okay so bestie, this is the std::flat_multiset::count(3) page from the C++ Standard Libary manual. The name is literally std::flat_multiset::count β like, the page and the member function said βsame name, same energyβ and honestly? Iconic. π
β¨ Synopsis β¨
Here are the signatures, copied exactly, no cap:
size_type count( const Key& key ) const; (1) (since C++23)
template< class K > (2) (since C++23)
size_type count( const K& x ) const;
Returns the number of elements with key that compares equivalent to the specified argument.
- 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-idCompare::is_transparentis valid and denotes a type. It allows calling this function without constructing an instance ofKey.
π Parameters π
keyβ key value of the elements to count.xβ alternative value to compare to the keys.
π Return value π
Number of elements with key that compares equivalent to key or x. That's the whole answer, bestie β it's giving βcounted and served.β π«Ά
π₯ Complexity π₯
Logarithmic in the size of the container plus linear in the number of elements found. Highkey important, lowkey cute. β¨
π Example π
This section is incomplete.
Reason: no example.
Not me reading βno exampleβ and feeling personally attacked π but okay, that's what the page says, fr fr.
π¦ 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
mwah π β source/version: http://cppreference.com, date: 2024.06.10, page: std::flat_multiset::count(3). That's the whole vibe, bestie, no cap π«Ά
π¦ 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