Files
2025-10-25 03:02:53 +03:00

1.9 KiB
Raw Permalink Blame History

[mdspan.sub.overview]

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.1 Overview [mdspan.sub.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 [mdspan.sub] that takes a parameter pack named slices as an argument:

let index_type be

M::index_type if the function is a member of a class M,

otherwise, remove_reference_t<decltype(src)>::index_type if the function has a parameter named src,

otherwise, the same type as the function's template argument IndexType;

let rank be the number of elements in slices;

let sk be the kth element of slices;

let Sk be the type of sk; and

let map-rank be an array<size_t, rank> such that for each k in the range [0, rank),map-rank[k] equals:

dynamic_extent if Sk models convertible_to<index_type>,

otherwise, the number of types Sj with j<k that do not model convertible_to<index_type>.