Created on 2019-11-07.00:00:00 last changed 45 months ago
Proposed resolution:
This wording is relative to N4835.
Change [concept.totallyordered] as indicated:
For some type T, let a, b, and c be lvalues of type const remove_reference_t<T>. T models totally_ordered only if
(1.1) — Exactly one of bool(a < b), bool(a > b), or bool(a == b) is true.
(1.2) — If bool(a < b) and bool(b < c), then bool(a < c).
(1.3) — bool(a > b) == bool(b < a).
(1.4) — bool(a <= b) == !bool(b < a).
(1.5) — bool(a >= b) == !bool(a < b).
template<class T, class U> concept totally_ordered_with = totally_ordered<T> && totally_ordered<U> &&common_reference_with<const remove_reference_t<T>&, const remove_reference_t<U>&> &&equality_comparable_with<T, U> && totally_ordered< common_reference_t< const remove_reference_t<T>&, const remove_reference_t<U>&>> &&equality_comparable_with<T, U> &&requires(const remove_reference_t<T>& t, const remove_reference_t<U>& u) { { t < u } -> boolean; { t > u } -> boolean; { t <= u } -> boolean; { t >= u } -> boolean; { u < t } -> boolean; { u > t } -> boolean; { u <= t } -> boolean; { u >= t } -> boolean; };
[ 2019-11 Moved to Ready on Friday AM in Belfast ]
Addresses US 201
The totally_ordered_with<T, U> redundantly requires both common_reference_with<const remove_reference_t&, const remove_reference_t&> and equality_comparable_with<T, U> (which also has the common_reference_with requirement). The redundant requirement should be removed.
Proposed change: Change the definition of totally_ordered_with to:template<class T, class U> concept totally_ordered_with = totally_ordered<T> && totally_ordered<U> && equality_comparable_with<T, U> && totally_ordered< common_reference_t< const remove_reference_t<T>&, const remove_reference_t<U<&>> && requires(const remove_reference_t<T<& t, const remove_reference_t>U>& u) { [… as before …]
History | |||
---|---|---|---|
Date | User | Action | Args |
2021-02-25 10:48:01 | admin | set | status: wp -> c++20 |
2020-02-24 16:02:59 | admin | set | status: voting -> wp |
2020-01-17 04:54:50 | admin | set | status: ready -> voting |
2019-11-08 12:06:23 | admin | set | messages: + msg10805 |
2019-11-08 12:06:23 | admin | set | status: new -> ready |
2019-11-07 19:28:47 | admin | set | messages: + msg10799 |
2019-11-07 00:00:00 | admin | create |