[mdspan.sub.extents] (original) (raw)

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.6 submdspan_extents function [mdspan.sub.extents]

template<class IndexType, size_t... Extents, class... SliceSpecifiers> constexpr auto submdspan_extents(const extents<IndexType, Extents...>& src, SliceSpecifiers... raw_slices);

Let slices be the pack introduced by the following declaration:auto [...slices] = submdspan_canonicalize_slices(src, raw_slices...);

Constraints: sizeof...(SliceSpecifiers) equals sizeof...(Extents).

Mandates: For each rank index k of src:

Preconditions: For each rank index k of src,slices...[k] is a valid submdspan slice for the extent of src.

Let SubExtents be a specialization of extents such that:

Returns: A value ext of type SubExtents such that for each rank index k of extents<IndexType, Extents...>, where the type of slices...[k] is not a collapsing slice type,ext.extent(MAP_RANK(slices, k))equals the following, where denotes slices...[k]: