C++ : Compare
cppreference.com
Compare , .
, Compare, contextually converted bool, true strict weak ordering relation false .
BinaryPredicate, , , const , const const ( C++20).
T Compare
comp,Tequiv(a, b), ,!comp(a, b) && !comp(b, a)
comp(a, b)
|
implicitly convertible bool
|
strict weak ordering
|
equiv(a, b)
|
bool
|
|
: comp strict total ordering , equiv
Compare.
| , ( ) | |
| -, , ( ) | |
| , ( ) | |
| -, ( ) | |
| ( ) | |
| ( ) | |
(C++11) |
(public - std::forward_list)
|
| (public - std::list)
| |
| , ( ) | |
| N ( ) | |
| ( ) | |
(C++11) |
, ( ) |
(C++11) |
( ) |
| , , ( ) | |
| , ( ) | |
| , ( ) | |
| , ( ) | |
| , ( ) | |
| ( ) | |
(C++11) |
(public - std::forward_list)
|
| (public - std::list)
| |
| ( ) | |
true, ( ) | |
| ( ) | |
| ( ) | |
| ( ) | |
| ( ) | |
| ( ) | |
| ( ) | |
| ( ) | |
| , ( ) | |
| , ( ) | |
(C++11) |
, ( ) |
| ( ) | |
| ( ) | |
| ( ) | |
| ( ) | |
(C++11) |
( ) |
(C++11) |
( ) |
true, ( ) | |
| ( ) | |
| ( ) |
(C++20) |
, relation () |
| Comparison operators | <, <=, >, >=, ==, !=, and <=> (C++20), compare the arguments
|