# std::experimental::ranges::StrictWeakOrder

> C++ Atlas: `cppatlas.com/w/cpp/experimental/ranges/concepts/StrictWeakOrder` | Source: https://en.cppreference.com/w/cpp/experimental/ranges/concepts/StrictWeakOrder | Domain: Technical specifications

The concept StrictWeakOrder<R, T, U> specifies that the Relation R imposes a strict weak ordering on its arguments. A relation r is a strict weak ordering if

## Official Specification Summary (cppreference)

```cpp
// Defined in header <experimental/ranges/concepts>

template< class R, class T, class U >
concept bool StrictWeakOrder = Relation<R, T, U>; // (1) (ranges TS)
```

The concept `StrictWeakOrder<R, T, U>` specifies that the `Relation` `R` imposes a strict weak ordering on its arguments. 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`.

### Notes

The distinction between `Relation` and `StrictWeakOrder` is purely semantic.

---
Attribution: content from https://en.cppreference.com/w/cpp/experimental/ranges/concepts/StrictWeakOrder (cppreference.com), licensed under CC-BY-SA 3.0 and GFDL. Modified: converted to markdown, study notes added. Offline snapshot of 9 February 2025.