std::flat_multimap::count(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

πŸ’– NAME πŸ’–

okay so bestie, this is the std::flat_multimap::count(3) page from the C++ Standard Libary (yes, the header spells it that way πŸ’€), and the NAME line is literally std::flat_multimap::count - std::flat_multimap::count. She counts how many elements have a key that matches the one you pass in. We love a focused icon. πŸ’…


✨ Synopsis ✨

          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.

  1. Returns the number of elements with key key.
  2. 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.

πŸ’… 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. Count 'em up, bestie. πŸ”₯


πŸ¦‹ Complexity πŸ¦‹

Logarithmic in the size of the container plus linear in the number of elements found. It's giving big-O homework, write it down. ⭐


πŸ“ Example πŸ“

This section is incomplete Reason: no example

😭 the example slot is empty, but the info is still iconic.


πŸ”₯ 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

source: http://cppreference.com Β· version/date: 2024.06.10 Β· page: std::flat_multimap::count(3) β€” that's the page, bestie, bye, mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from