[mdspan.accessor.aligned.members]

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

## 23.7 Views [[views]](views#mdspan.accessor.aligned.members)

### 23.7.3 Multidimensional access [[views.multidim]](views.multidim#mdspan.accessor.aligned.members)

#### 23.7.3.5 Accessor policy [[mdspan.accessor]](mdspan.accessor#aligned.members)

#### 23.7.3.5.4 Class template aligned_accessor [[mdspan.accessor.aligned]](mdspan.accessor.aligned#members)

#### 23.7.3.5.4.2 Members [mdspan.accessor.aligned.members]

[ð](#lib:aligned_accessor,constructor)

`template<class OtherElementType, size_t OtherByteAlignment>
  constexpr aligned_accessor(aligned_accessor<OtherElementType, OtherByteAlignment>) noexcept;
`

[1](#1)

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

*Constraints*: 

- [(1.1)](#1.1)

  is_convertible_v<OtherElementType(*)[], element_type(*)[]> is true[.](#1.1.sentence-1)

- [(1.2)](#1.2)

  OtherByteAlignment >= byte_alignment is true[.](#1.2.sentence-1)

[2](#2)

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

*Effects*: None[.](#2.sentence-1)

[ð](#lib:aligned_accessor,constructor_)

`template<class OtherElementType>
  constexpr explicit aligned_accessor(default_accessor<OtherElementType>) noexcept;
`

[3](#3)

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

*Constraints*: is_convertible_v<OtherElementType(*)[], element_type(*)[]> is true[.](#3.sentence-1)

[4](#4)

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

*Effects*: None[.](#4.sentence-1)

[ð](#lib:access,aligned_accessor)

`constexpr reference access(data_handle_type p, size_t i) const noexcept;
`

[5](#5)

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

*Preconditions*: [0, i + 1) is an accessible range for p and *this[.](#5.sentence-1)

[6](#6)

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

*Effects*: Equivalent to: return assume_aligned<byte_alignment>(p)[i];

[ð](#lib:operator_default_accessor,aligned_accessor)

`template<class OtherElementType>
  constexpr operator default_accessor<OtherElementType>() const noexcept;
`

[7](#7)

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

*Constraints*: is_convertible_v<element_type(*)[], OtherElementType(*)[]> is true[.](#7.sentence-1)

[8](#8)

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

*Effects*: Equivalent to: return {};

[ð](#lib:offset,aligned_accessor)

`constexpr typename offset_policy::data_handle_type
  offset(data_handle_type p, size_t i) const noexcept;
`

[9](#9)

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

*Preconditions*: [0, i + 1) is an accessible range for p and *this[.](#9.sentence-1)

[10](#10)

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

*Effects*: Equivalent to: return assume_aligned<byte_alignment>(p) + i;
