2.0 KiB
[concept.strictweakorder]
18 Concepts library [concepts]
18.7 Callable concepts [concepts.callable]
18.7.7 Concept strict_weak_order [concept.strictweakorder]
template<class R, class T, class U> concept [strict_weak_order](#concept:strict_weak_order "18.7.7 Concept strict_weak_order [concept.strictweakorder]") = [relation](concept.relation#concept:relation "18.7.5 Concept relation [concept.relation]")<R, T, U>;
A relation models strict_weak_order only if it imposes a strict weak ordering on its arguments.
The termstrict refers to the requirement of an irreflexive relation (!comp(x, x) for all x), and the termweak to requirements that are not as strong as those for a total ordering, but stronger than those for a partial ordering.
If we defineequiv(a, b) as!comp(a, b) && !comp(b, a), then the requirements are thatcomp andequiv both be transitive relations:
comp(a, b) && comp(b, c) impliescomp(a, c)
equiv(a, b) && equiv(b, c) impliesequiv(a, c)
[Note 1:
Under these conditions, it can be shown that
equiv is an equivalence relation,
comp induces a well-defined relation on the equivalence classes determined byequiv, and
the induced relation is a strict total ordering.
â end note]