Files
cppdraft_translate/cppdraft/mdspan/syn.md
2025-10-25 03:02:53 +03:00

3.1 KiB

[mdspan.syn]

23 Containers library [containers]

23.7 Views [views]

23.7.3 Multidimensional access [views.multidim]

23.7.3.2 Header synopsis [mdspan.syn]

🔗

// mostly freestandingnamespace std {// [mdspan.extents], class template extentstemplate<class IndexType, size_t... Extents>class extents; // [mdspan.extents.dextents], alias template dextentstemplate<class IndexType, size_t Rank>using dextents = see below; // [mdspan.extents.dims], alias template dimstemplate<size_t Rank, class IndexType = size_t>using dims = see below; // [mdspan.layout], layout mappingstruct layout_left; struct layout_right; struct layout_stride; template<size_t PaddingValue = dynamic_extent>struct layout_left_padded; template<size_t PaddingValue = dynamic_extent>struct layout_right_padded; // [mdspan.accessor.default], class template default_accessortemplateclass default_accessor; // [mdspan.accessor.aligned], class template aligned_accessortemplate<class ElementType, size_t ByteAlignment>class aligned_accessor; // [mdspan.mdspan], class template mdspantemplate<class ElementType, class Extents, class LayoutPolicy = layout_right, class AccessorPolicy = default_accessor>class mdspan; // partially freestanding// [mdspan.sub], submdspan creationtemplate<class OffsetType, class LengthType, class StrideType>struct strided_slice; templatestruct submdspan_mapping_result; struct full_extent_t { explicit full_extent_t() = default; }; inline constexpr full_extent_t full_extent{}; template<class IndexType, size_t... Extents, class... SliceSpecifiers>constexpr auto submdspan_extents(const extents<IndexType, Extents...>&, SliceSpecifiers...); // [mdspan.sub.sub], submdspan function templatetemplate<class ElementType, class Extents, class LayoutPolicy, class AccessorPolicy, class... SliceSpecifiers>constexpr auto submdspan(const mdspan<ElementType, Extents, LayoutPolicy, AccessorPolicy>& src, SliceSpecifiers... slices) -> see below; template<class T, class IndexType>concept index-pair-like = // exposition onlypair-like &&convertible_to<tuple_element_t<0, T>, IndexType> &&convertible_to<tuple_element_t<1, T>, IndexType>;}