24 Containers library [containers]

24.7 Views [views]

24.7.2 Contiguous access [views.contiguous]

24.7.2.2 Class template span [views.span]

24.7.2.2.6 Element access [span.elem]

constexpr reference operator[](size_type idx) const;
Preconditions: idx < size() is true.
Effects: Equivalent to: return *(data() + idx);
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.
Effects: Equivalent to: return *data();
constexpr reference back() const;
Preconditions: empty() is false.
Effects: Equivalent to: return *(data() + (size() - 1));
constexpr pointer data() const noexcept;
Effects: Equivalent to: return data_;