24 Containers library [containers]

24.7 Views [views]

24.7.3 Multidimensional access [views.multidim]

24.7.3.4 Layout mapping [mdspan.layout]

24.7.3.4.5 Class template layout_left​::​mapping [mdspan.layout.left]

24.7.3.4.5.3 Observers [mdspan.layout.left.obs]

constexpr index_type required_span_size() const noexcept;
Returns: extents().fwd-prod-of-extents(extents_type​::​rank()).
template<class... Indices> constexpr index_type operator()(Indices... i) const noexcept;
Constraints:
  • sizeof...(Indices) == extents_type​::​rank() is true,
  • (is_convertible_v<Indices, index_type> && ...) is true, and
  • (is_nothrow_constructible_v<index_type, Indices> && ...) is true.
Preconditions: extents_type​::​index-cast(i) is a multidimensional index in extents_ ([mdspan.overview]).
Effects: Let P be a parameter pack such that is_same_v<index_sequence_for<Indices...>, index_sequence<P...>> is true.
Equivalent to: return ((static_cast<index_type>(i) * stride(P)) + ... + 0);
constexpr index_type stride(rank_type i) const;
Constraints: extents_type​::​rank() > 0 is true.
Preconditions: i < extents_type​::​rank() is true.
Returns: extents().fwd-prod-of-extents(i).
template<class OtherExtents> friend constexpr bool operator==(const mapping& x, const mapping<OtherExtents>& y) noexcept;
Constraints: extents_type​::​rank() == OtherExtents​::​rank() is true.
Effects: Equivalent to: return x.extents() == y.extents();