[mdspan.layout.right.obs]

# 23 Containers library [[containers]](./#containers)

## 23.7 Views [[views]](views#mdspan.layout.right.obs)

### 23.7.3 Multidimensional access [[views.multidim]](views.multidim#mdspan.layout.right.obs)

#### 23.7.3.4 Layout mapping [[mdspan.layout]](mdspan.layout#right.obs)

#### 23.7.3.4.6 Class template layout_right​::​mapping [[mdspan.layout.right]](mdspan.layout.right#obs)

#### 23.7.3.4.6.3 Observers [mdspan.layout.right.obs]

[ð](#lib:required_span_size,layout_right::mapping)

`constexpr index_type required_span_size() const noexcept;
`

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L22484)

*Returns*: extents().*fwd-prod-of-extents*(extents_type​::​rank())[.](#1.sentence-1)

[ð](#lib:operator(),layout_right::mapping)

`template<class... Indices>
  constexpr index_type operator()(Indices... i) const noexcept;
`

[2](#2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L22496)

*Constraints*: 

- [(2.1)](#2.1)

sizeof...(Indices) == extents_type​::​rank() is true,

- [(2.2)](#2.2)

(is_convertible_v<Indices, index_type> && ...) is true, and

- [(2.3)](#2.3)

(is_nothrow_constructible_v<index_type, Indices> && ...) istrue[.](#2.sentence-1)

[3](#3)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L22508)

*Preconditions*: extents_type​::​*index-cast*(i) is
a multidimensional index in *extents_* ([[mdspan.overview]](mdspan.overview "23.7.3.1 Overview"))[.](#3.sentence-1)

[4](#4)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L22513)

*Effects*: Let P be a parameter pack such thatis_same_v<index_sequence_for<Indices...>, index_sequence<P...>> is true[.](#4.sentence-1)

Equivalent to:return ((static_cast<index_type>(i) * stride(P)) + ... + 0);

[ð](#lib:stride,layout_right::mapping)

`constexpr index_type stride(rank_type i) const noexcept;
`

[5](#5)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L22531)

*Constraints*: extents_type​::​rank() > 0 is true[.](#5.sentence-1)

[6](#6)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L22535)

*Preconditions*: i < extents_type​::​rank() is true[.](#6.sentence-1)

[7](#7)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L22539)

*Returns*: extents().*rev-prod-of-extents*(i)[.](#7.sentence-1)

[ð](#lib:operator==,layout_right::mapping)

`template<class OtherExtents>
  friend constexpr bool operator==(const mapping& x, const mapping<OtherExtents>& y) noexcept;
`

[8](#8)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L22551)

*Constraints*: extents_type​::​rank() == OtherExtents​::​rank() is true[.](#8.sentence-1)

[9](#9)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L22555)

*Effects*: Equivalent to: return x.extents() == y.extents();
