Created on 2025-10-02.00:00:00 last changed 1 month ago
Proposed resolution:
This wording is relative to N5014.
Modify [span.cons] as indicated:
template<class R> constexpr explicit(extent != dynamic_extent) span(R&& r);-?- Mandates: If `extent` is not equal to `dynamic_extent` and `ranges::size(r)` is a constant expression, then `ranges::size(r) == extent` is `true`.
-16- Constraints: Let `U` beremove_reference_t<ranges::range_reference_t<R>>. […]
[ 2025-10-20; Reflector poll. ]
Set priority to 3 after reflector poll.
The opinions on reflector discussion where split regarding, if this should be considered LEWG matter.
Question was raised, if ranges::size(r) == N is required to be usable at compile-time for integer-class types.
It is preferable to reject span<int, 42>(views::empty<int>)
at compile-time after P2280R4, since applying `ranges::size` on those
ranges is a constant expression now.
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2025-10-20 16:15:31 | admin | set | messages: + msg15279 |
| 2025-10-04 10:45:28 | admin | set | messages: + msg15112 |
| 2025-10-02 00:00:00 | admin | create | |