std::flat_m...alue_compare(3)
π¦ std::flat_multimap::value_compare π¦
okay bestie, welcome to the C++ Standard Library manual π we're looking at std::flat_multimap::value_compare, and it's giving very niche-but-iconic comparator energy β¨
β¨ NAME β¨
std::flat_multimap::value_compare β literally the std::flat_multimap::value_compare page, no cap π«Ά
π Synopsis π
class value_compare;
(since C++23)
std::flat_multimap::value_compare is a function object that compares objects of type std::flat_multimap::const_reference (a pair of references to the stored key/value) by comparing the first components (i.e. keys) of the passed pairs. slay, keys only π
π Member objects π
comp(private) β the comparison function object of typestd::flat_multimap::key_compare(exposition-only member object*).
πΈ Member functions πΈ
- constructor (private) β constructs a
value_compareobject; the page also labels it (public member function). operator()β compares two values of typevalue_type(public member function).
π οΈ std::flat_multimap<Key,T,Compare,KeyContainer,MappedContainer>::value_compare::value_compare π οΈ
private: (exposition only*)
value_compare( key_compare c );
It initializes the underlying instance of the comparator comp to c. cute π
π Parameters π
cβ a comparator to assign.
π₯ std::flat_multimap<Key,T,Compare,KeyContainer,MappedContainer>::value_compare::operator() π₯
bool operator()( const const_reference& lhs, const const_reference& rhs ) const;
Compares lhs.first and rhs.first by calling the stored comparator comp. yes bestie, it's comparing the keys π
π Parameters π
lhs, rhsβ values to compare.
β Return value β
comp(lhs.first, rhs.first)
π Exceptions π
May throw implementation-defined exceptions. dramatic, but that's what it says π
π source/version:cppreference.comΒ· date:2024.06.10Β· that's the whole page, mwah π
π¦ 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