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.
| Type | Definition |
|---|---|
result_type (deprecated in C++17)(removed in C++20) | bool |
first_argument_type (deprecated in C++17)(removed in C++20) | value_type |
second_argument_type (deprecated in C++17)(removed in C++20) | value_type |
| These member types are obtained via publicly inheriting | (until C++11) |
| Compare comp | the stored comparator (protected member object) |
| (constructor) | constructs a new value_compare object (protected member function) |
| operator() | compares two values of type value_type (public member function) |
protected: value_compare( Compare c ); |
Initializes the internal instance of the comparator to c.
| c | - | comparator to assign |
bool operator()( const value_type& lhs, const value_type& rhs ) const; |
Compares lhs.first and rhs.first by calling the stored comparator.
| lhs, rhs | - | values to compare |
comp(lhs.first, rhs.first).
May throw implementation-defined exceptions.
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/w/cpp/container/multimap/value_compare