std::multim...lue_compare(3)
β¨ std::multimap::value_compare β¨
Okay bestie, this is the C++ Standard Libary page for std::multimap::value_compare, and it's giving very specific comparator energy β no cap π
πΈ NAME πΈ
std::multimap::value_compare β std::multimap::value_compare
Yes, it's the same on both sides of the dash. We're keeping it. Iconic.
β¨ Synopsis β¨
class value_compare;
std::multimap::value_compare is a function object that compares objects of type std::multimap::value_type (key-value pairs) by comparing of the first components of the pairs. That's the whole vibe: function object, key-value pairs, first components first π₯
π Member types π
Type-to-definition mapping, bestie:
result_typeβ deprecated in C++17, removed in C++20 β maps toboolfirst_argument_typeβ deprecated in C++17, removed in C++20 β maps tovalue_typesecond_argument_typeβ deprecated in C++17, removed in C++20 β maps tovalue_type
These member types are obtained via publicly inheriting (until C++11) std::binary_function<value_type, value_type, bool>. Periodt.
π¦ Protected member objects π¦
Compare compβ the stored comparator (protected member object) π«Ά
π Member functions π
- constructor β constructs a new
value_compareobject (protected member function) operator()β compares two values of typevalue_type(public member function)
π§ std::multimap<Key,T,Compare,Alloc>::value_compare::value_compare π§
protected:
value_compare( Compare c );
It initializes the internal instance of the comparator to c. Cute, protected, very VIP.
π Parameters π
cβ comparator to assign
π₯ std::multimap<Key,T,Compare,Alloc>::value_compare::operator() π₯
bool operator()( const value_type& lhs, const value_type& rhs ) const;
Compares lhs.first and rhs.first by calling the stored comparator. Main character comparator behavior, honestly π
π Parameters π
lhs,rhsβ values to compare
π Return value π
comp(lhs.first, rhs.first)
π Exceptions π
May throw implementation-defined exceptions. So like, don't assume it's chill in every implementation, bestie π
Footer source/version/date sign-off, because we do not leave the footer hanging: http://cppreference.com Β· 2024.06.10 Β· std::multim...lue_compare(3) β bye bestie, 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