std::strict_weak_order
From cppreference.com
 
 
 
 
 
 C++ 
 Feature test macros (C++20)
 Concepts library (C++20)
 Metaprogramming library (C++11)
 Ranges library (C++20)
 Filesystem library (C++17)
 Concurrency support library (C++11)
 Execution control library (C++26)
Concepts library 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)(C++20)
(C++20)
(C++20)
(C++20)
  (C++20)
(C++20)
(C++20)
(C++20)(C++20)
(C++20)(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)(C++20)
(C++20)
(C++20)
(C++20)
strict_weak_order
(C++20)
 Exposition-only concepts
 (C++20)
Defined in header 
 
 
<concepts> 
 template< class R, class T, class U >
concept strict_weak_order = std::relation <R, T, U>;
 
 (since C++20) 
concept strict_weak_order = std::relation <R, T, U>;
The concept strict_weak_order<R, T, U> specifies that the relation R imposes a strict weak ordering on its arguments.
[edit] Semantic requirements
A relation r is a strict weak ordering if
- it is irreflexive: for all x, r(x, x) is false;
- it is transitive: for all a, b and c, if r(a, b) and r(b, c) are both true then r(a, c) is true;
- let e(a, b) be !r(a, b) && !r(b, a), then e is transitive: e(a, b) && e(b, c) implies e(a, c).
Under these conditions, it can be shown that e is an equivalence relation, and r induces a strict total ordering on the equivalence classes determined by e.
[edit] Notes
The distinction between relation and strict_weak_order is purely semantic.
[edit] References
- C++23 standard (ISO/IEC 14882:2024):
-  18.7.7 Concept strict_weak_order[concept.strictweakorder]
 
-  18.7.7 Concept 
- C++20 standard (ISO/IEC 14882:2020):
-  18.7.7 Concept strict_weak_order[concept.strictweakorder]
 
-  18.7.7 Concept