class value_compare; |
std::map::value_compare is a function object that compares objects of type std::map::value_type (key-value pairs) by comparing of the first components of the pairs.
Member types
| (until C++20) |
| 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).
(none).
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
http://en.cppreference.com/w/cpp/container/map/value_compare