#
Let:
2
#
For the purpose of this section, the meaning of submdspan_mapping is established as if by performing argument-dependent lookup only ([basic.lookup.argdep]).
A type M meets the sliceable layout mapping requirements if
  • M meets the layout mapping requirements ([mdspan.layout.policy.reqmts]),
  • the expression submdspan_mapping(m, invalid_slices..) is ill-formed, and
  • the following expression is well-formed and has the specified semantics: submdspan_mapping(m, valid_slices..)
Result: A type SMR that is a specialization of type submdspan_mapping_result<SM> for some type SM such that
  • SM meets the layout mapping requirements ([mdspan.layout.policy.reqmts]),
  • SM​::​extents_type is a specialization of extents,
  • SM​::​extents_type​::​rank() equals MAP_RANK(valid_slices, M_rank), and
  • SM​::​extents_type​::​index_type denotes IT.
Returns: An object smr of type SMR such that
  • smr.mapping.extents() == submdspan_extents(m.extents(), valid_slices..) is true;
    and
  • for each integer pack i which is a multidimensional index in smr.mapping.extents(),
    smr.mapping(i..) + smr.offset == m(j) is true, where j is an integer pack such that
    • sizeof.(j) is equal to M_rank; and
    • for each rank index ρ of m.extents(), j..[ρ] is equal to the sum of
      • the lower bound of the submdspan slice range of valid_slices..[ρ] for extent ρ of m.extents(), and
      • zero if the type of valid_slices..[ρ] is a collapsing slice type, i..[MAP_RANK(valid_slices,ρ)] otherwise.
template<class LayoutMapping> concept sliceable-mapping = see below;
Let lm be an object of type LayoutMapping and let fe denote a pack of objects of type full_extent_t for which sizeof.(fe) == LayoutMapping​::​extents_type​::​rank() is true.
A type LayoutMapping satisfies sliceable-mapping if
  • the expression submdspan_mapping(m, fe..) is well-formed when treated as an unevaluated operand, and
  • the type of that expression is a specialization of submdspan_mapping_result.
A type LayoutMapping models sliceable-mapping if LayoutMapping meets the sliceable layout mapping requirements.

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant