We propose the following fixes to submdspan for C++26.
Permit user-defined pair types to be used as slices, rather than restricting the list to the opt-in set of types in [tuple.like].
Change layout_left, layout_right, layout_left_padded, and layout_right_padded so that if a slice is strided_slice where stride_type models integral-constant-like and stride_type::value equals 1, then the same layout mapping type results as if the slice models index-pair-like<index_type>. This lets users express a slice with compile-time extent that does not cause common layouts to devolve into layout_stride.
Add P3355R0, "Fix submdspan for C++26."
We propose the following fixes to
submdspan
for C++26.Permit user-defined pair types to be used as slices, rather than restricting the list to the opt-in set of types in [tuple.like].
Change
layout_left
,layout_right
,layout_left_padded
, andlayout_right_padded
so that if a slice isstrided_slice
wherestride_type
modelsintegral-constant-like
andstride_type::value
equals 1, then the same layout mapping type results as if the slice modelsindex-pair-like
<index_type>
. This lets users express a slice with compile-time extent that does not cause common layouts to devolve intolayout_stride
.