23 Containers library [containers]

23.7 Views [views]

23.7.3 Multidimensional access [views.multidim]

23.7.3.7 submdspan [mdspan.sub]

23.7.3.7.2 Range slices [mdspan.sub.range.slices]

extent_slice and range_slice represent a set of extent regularly spaced integer indices.
The indices start at offset and first, respectively, and increase by increments of stride.
namespace std { template<class OffsetType, class ExtentType, class StrideType> struct extent_slice { using offset_type = OffsetType; using extent_type = ExtentType; using stride_type = StrideType; [[no_unique_address]] offset_type offset{}; [[no_unique_address]] extent_type extent{}; [[no_unique_address]] stride_type stride{}; }; template<class FirstType, class LastType, class StrideType = std::constant_wrapper<1zu>> struct range_slice { [[no_unique_address]] FirstType first{}; [[no_unique_address]] LastType last{}; [[no_unique_address]] StrideType stride{}; }; }
extent_slice and range_slice have the data members and special members specified above.
They have no base classes or members other than those specified.
Mandates: OffsetType, ExtentType, FirstType, LastType, and StrideType are signed or unsigned integer types, or model integral-constant-like.
[Note 1: 
Both extent_slice{.offset = 1, .extent = 4, .stride = 3} and range_slice{.first = 1, .last = 11, .stride = 3} indicate the indices 1, 4, 7, and 10.
Indices are selected from the half-open interval [1, 1 + 10).
— end note]