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.7 Specializations of submdspan_mapping [mdspan.sub.map]

23.7.3.7.7.2 Common [mdspan.sub.map.common]

The following elements apply to all functions in [mdspan.sub.map].
Constraints: sizeof...(SpliceSpecifiers) equals extents_type​::​rank().
Mandates: For each rank index k of extents(), SliceSpecifiers...[k] is a valid submdspan slice type for the extent of Extents.
Preconditions: For each rank index k of extents(), slices...[k] is a valid slice for the extent of extents().
Let sub_ext be the result of submdspan_extents(extents(), slices...) and let SubExtents be decltype(sub_ext).
Let sub_strides be an array<SubExtents​::​index_type, SubExtents​::​rank()> such that for each rank index k of extents() for which the type of slices...[k] is not a collapsing slice type, sub_strides[MAP_RANK(slices,k)] equals:
  • stride(k) * s.stride if the type of s is a specialization of strided_slice and s.stride < s.extent is true, where s is slices...[k];
  • otherwise, stride(k).
Let ls be a pack of values of index_type, where the element equals the lower bound of the submdspan slice range of slices...[ρ] for extent ρ of extents().
If ls...[k] equals extents().extent(k) for any rank index k of extents(), then let offset be a value of type size_t equal to required_span_size().
Otherwise, let offset be a value of type size_t equal to operator()(ls...).