23 Containers library [containers]

23.7 Views [views]

23.7.2 Contiguous access [views.contiguous]

23.7.2.2 Class template span [views.span]

23.7.2.2.6 Element access [span.elem]

constexpr reference operator[](size_type idx) const;
Preconditions: idx < size() is true.
Returns: *(data() + idx).
Throws: Nothing.
constexpr reference at(size_type idx) const;
Returns: *(data() + idx).
Throws: out_of_range if idx >= size() is true.
constexpr reference front() const;
Preconditions: empty() is false.
Returns: *data().
Throws: Nothing.
constexpr reference back() const;
Preconditions: empty() is false.
Returns: *(data() + (size() - 1)).
Throws: Nothing.
constexpr pointer data() const noexcept;
Returns: data_.