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

15 lines
3.1 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[mdspan.syn]
# 23 Containers library [[containers]](./#containers)
## 23.7 Views [[views]](views#mdspan.syn)
### 23.7.3 Multidimensional access [[views.multidim]](views.multidim#mdspan.syn)
#### 23.7.3.2 Header <mdspan> synopsis [mdspan.syn]
[🔗](#header:%3cmdspan%3e)
// mostly freestandingnamespace std {// [[mdspan.extents]](mdspan.extents "23.7.3.3Class template extents"), class template extentstemplate<class IndexType, size_t... Extents>class extents; // [[mdspan.extents.dextents]](mdspan.extents.dextents "23.7.3.3.6Alias template dextents"), alias template dextentstemplate<class IndexType, size_t Rank>using dextents = *see below*; // [[mdspan.extents.dims]](mdspan.extents.dims "23.7.3.3.7Alias template dims"), alias template dimstemplate<size_t Rank, class IndexType = size_t>using dims = *see below*; // [[mdspan.layout]](mdspan.layout "23.7.3.4Layout mapping"), 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]](mdspan.accessor.default "23.7.3.5.3Class template default_­accessor"), class template default_accessortemplate<class ElementType>class default_accessor; // [[mdspan.accessor.aligned]](mdspan.accessor.aligned "23.7.3.5.4Class template aligned_­accessor"), class template aligned_accessortemplate<class ElementType, size_t ByteAlignment>class aligned_accessor; // [[mdspan.mdspan]](mdspan.mdspan "23.7.3.6Class template mdspan"), class template mdspantemplate<class ElementType, class Extents, class LayoutPolicy = layout_right, class AccessorPolicy = default_accessor<ElementType>>class mdspan; // partially freestanding// [[mdspan.sub]](mdspan.sub "23.7.3.7submdspan"), submdspan creationtemplate<class OffsetType, class LengthType, class StrideType>struct strided_slice; template<class LayoutMapping>struct 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]](mdspan.sub.sub "23.7.3.7.7submdspan function template"), 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*](#concept:index-pair-like "23.7.3.2Header <mdspan> synopsis[mdspan.syn]") = // *exposition only*[*pair-like*](tuple.syn#concept:pair-like "22.4.2Header <tuple> synopsis[tuple.syn]")<T> &&[convertible_to](concept.convertible#concept:convertible_to "18.4.4Concept convertible_­to[concept.convertible]")<tuple_element_t<0, T>, IndexType> &&[convertible_to](concept.convertible#concept:convertible_to "18.4.4Concept convertible_­to[concept.convertible]")<tuple_element_t<1, T>, IndexType>;}