1.5 KiB
[comparisons.general]
22 General utilities library [utilities]
22.10 Function objects [function.objects]
22.10.8 Comparisons [comparisons]
22.10.8.1 General [comparisons.general]
The library provides basic function object classes for all of the comparison operators in the language ([expr.rel], [expr.eq]).
For templates less, greater, less_equal, andgreater_equal, the specializations for any pointer type yield a result consistent with the implementation-defined strict total order over pointers ([defns.order.ptr]).
[Note 1:
If a < b is well-defined for pointers a and b of type P, then (a < b) == less
()(a, b),(a > b) == greater
()(a, b), and so forth.
â end note]
For template specializations less, greater,less_equal, and greater_equal, if the call operator calls a built-in operator comparing pointers, the call operator yields a result consistent with the implementation-defined strict total order over pointers.