(C++17) | ||||
| Sequence | ||||
(C++11) | ||||
(C++26) | ||||
(C++26) | ||||
(C++11) | ||||
| Associative | ||||
| Unordered associative | ||||
(C++11) | ||||
(C++11) | ||||
(C++11) | ||||
(C++11) | ||||
| Adaptors | ||||
(C++23) | ||||
(C++23) | ||||
(C++23) | ||||
(C++23) | ||||
| Views | ||||
(C++20) | ||||
(C++23) | ||||
| Tables | ||||
| Iterator invalidation | ||||
| Member function table | ||||
| Non-member function table |
class value_compare; | (since C++23) | |
std::flat_map::value_compare is a function object that compares objects of typestd::flat_map::const_reference (a pair of references to the stored key/value) by comparing the first components (i.e. keys) of the passed pairs.
Contents |
| Member name | Definition |
comp(private) | the comparison function object of typestd::flat_map::key_compare(exposition-only member object*) |
(constructor) (private) | constructsvalue_compare object(public member function) |
operator() | compares two values of typevalue_type(public member function) |
private: value_compare( key_compare c); | (exposition only*) | |
Initializes the underlying instance of the comparatorcomp toc.
| c | - | a comparator to assign |
bool operator()(const const_reference& lhs,const const_reference& rhs)const; | ||
Compareslhs.first andrhs.first by calling the stored comparatorcomp.
| lhs, rhs | - | values to compare |
comp(lhs.first, rhs.first)
May throw implementation-defined exceptions.