24
Containers library
[containers]
24.7
Views
[views]
24.7.3
Multidimensional access
[views.multidim]
24.7.3.7
submdspan
[mdspan.submdspan]
24.7.3.7.2
strided_
slice
[mdspan.submdspan.strided.slice]
1
#
strided_
slice
represents a set of
extent
regularly spaced integer indices
.
The indices start at
offset
, and increase by increments of
stride
.
🔗
namespace
std
{
template
<
class
OffsetType,
class
ExtentType,
class
StrideType
>
struct
strided_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
{
}
;
}
;
}
2
#
strided_
slice
has the data members and special members specified above
.
It has no base classes or members other than those specified
.
3
#
Mandates
:
OffsetType
,
ExtentType
, and
StrideType
are signed or unsigned integer types, or model
integral-constant-like
.
[
Note
1
:
strided_
slice
{
.
offset
=
1
,
.
extent
=
10
,
.
stride
=
3
}
indicates the indices
1
,
4
,
7
, and
10
.
Indices are selected from the half-open interval [
1
,
1
+
10
)
.
—
end note
]