Created on 2025-10-02.00:00:00 last changed 1 week 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>>
. […]
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-04 10:45:28 | admin | set | messages: + msg15112 |
2025-10-02 00:00:00 | admin | create |