23 Containers library [containers]

23.7 Views [views]

23.7.3 Multidimensional access [views.multidim]

23.7.3.5 Accessor policy [mdspan.accessor]

23.7.3.5.4 Class template aligned_accessor [mdspan.accessor.aligned]

23.7.3.5.4.2 Members [mdspan.accessor.aligned.members]

template<class OtherElementType, size_t OtherByteAlignment> constexpr aligned_accessor(aligned_accessor<OtherElementType, OtherByteAlignment>) noexcept;
Constraints:
  • is_convertible_v<OtherElementType(*)[], element_type(*)[]> is true.
  • OtherByteAlignment >= byte_alignment is true.
Effects: None.
template<class OtherElementType> constexpr explicit aligned_accessor(default_accessor<OtherElementType>) noexcept;
Constraints: is_convertible_v<OtherElementType(*)[], element_type(*)[]> is true.
Effects: None.
constexpr reference access(data_handle_type p, size_t i) const noexcept;
Preconditions: [0, i + 1) is an accessible range for p and *this.
Effects: Equivalent to: return assume_aligned<byte_alignment>(p)[i];
template<class OtherElementType> constexpr operator default_accessor<OtherElementType>() const noexcept;
Constraints: is_convertible_v<element_type(*)[], OtherElementType(*)[]> is true.
Effects: Equivalent to: return {};
constexpr typename offset_policy::data_handle_type offset(data_handle_type p, size_t i) const noexcept;
Preconditions: [0, i + 1) is an accessible range for p and *this.
Effects: Equivalent to: return assume_aligned<byte_alignment>(p) + i;