The concept
std::totally_ordered
specifies that the comparison operators
==,!=,<,>,<=,>=
on a type yield results consistent with a
strict total orderon the type.
2) The concept std::totally_ordered_with
specifies that the comparison operators ==,!=,<,>,<=,>=
on (possibly mixed) T
and U
operands yield results consistent with a strict total order. Comparing mixed operands yields results equivalent to comparing the operands converted to their common type.
3) The exposition-only concept __PartiallyOrderedWith
specifies that a value of type T
and a value of type U
can be compared in a partial order with each other (in either order) using <
, >
, <=
, and >=
, and the results of the comparisons are consistent.
These concepts are modeled only if they are satisfied and all concepts they subsume are modeled.
1) std::totally_ordered<T>is modeled only if, given lvalues
a
,
b
and
c
of type
const std::remove_reference_t<T>:
is modeled only if, given
t
and t2
, lvalues denoting distinct equal objects of types const std::remove_reference_t<T> and std::remove_reference_t<T> respectively, andu
and u2
, lvalues denoting distinct equal objects of types const std::remove_reference_t<U> and std::remove_reference_t<U> respectively,let C
be std::common_reference_t<const std::remove_reference_t<T>&, const std::remove_reference_t<U>&>, and, given an expression E
and a type C
, let CONVERT_TO<C>(E) be:
the following are true:
is modeled only if given
t
of type const std::remove_reference_t<T>, andu
of type const std::remove_reference_t<U>,the following are true:
Expressions declared in requires expressions of the standard library concepts are required to be equality-preserving (except where stated otherwise).
[edit] Implicit expression variationsA requires expression that uses an expression that is non-modifying for some constant lvalue operand also requires implicit expression variations.
[edit] Referencestotally_ordered
[concept.totallyordered]totally_ordered
[concept.totallyordered]RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4