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.1
Overview
[mdspan.submdspan.overview]
1
#
The
submdspan
facilities create a new
mdspan
viewing a subset of elements of an existing input
mdspan
.
The subset viewed by the created
mdspan
is determined by the
SliceSpecifier
arguments
.
2
#
For each function defined in subclause
[mdspan.
submdspan]
that takes a parameter pack named
slices
as an argument:
(2.1)
let
index_
type
be
(2.1.1)
M
::
index_
type
if the function is a member of a class
M
,
(2.1.2)
otherwise,
remove_
reference_
t
<
decltype
(
src
)
>
::
index_
type
if the function has a parameter named
src
,
(2.1.3)
otherwise, the same type as the function's template argument
IndexType
;
(2.2)
let
rank
be the number of elements in
slices
;
(2.3)
let
s
k
be the
k
th
element of
slices
;
(2.4)
let
S
k
be the type of
s
k
; and
(2.5)
let
map-rank
be an
array
<
size_
t, rank
>
such that for each
k
in the range [
0
, rank
),
map-rank
[
k
]
equals:
(2.5.1)
dynamic_
extent
if
S
k
models
convertible_
to
<
index_
type
>
,
(2.5.2)
otherwise, the number of types
S
j
with
j
<
k
that do not model
convertible_
to
<
index_
type
>
.