[mdspan.layout.left.obs]

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

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

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

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

#### 23.7.3.4.5 Class template layout_left​::​mapping [[mdspan.layout.left]](mdspan.layout.left#obs)

#### 23.7.3.4.5.3 Observers [mdspan.layout.left.obs]

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

`constexpr index_type required_span_size() const noexcept;
`

[1](#1)

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

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

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

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

[2](#2)

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

*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> && ...) is true[.](#2.sentence-1)

[3](#3)

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

*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#L22186)

*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_left::mapping)

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

[5](#5)

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

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

[6](#6)

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

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

[7](#7)

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

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

[ð](#lib:operator==,layout_left::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#L22225)

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

[9](#9)

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

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