This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of New status.
span(R&& r)
Section: 23.7.2.2.2 [span.cons] Status: New Submitter: Hewill Kang Opened: 2025-10-02 Last modified: 2025-10-04
Priority: Not Prioritized
View all other issues in [span.cons].
View all issues with New status.
Discussion:
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.
Proposed resolution:
This wording is relative to N5014.
Modify 23.7.2.2.2 [span.cons] as indicated:
template<class R> constexpr explicit(extent != dynamic_extent) span(R&& r);-?- Mandates: If
-16- Constraints: Letextent
is not equal todynamic_extent
andranges::size(r)
is a constant expression, thenranges::size(r) == extent
istrue
.U
beremove_reference_t<ranges::range_reference_t<R>>
. […]