Returns a reference to the `i`th element of this span.

Synopsis

Declared in <absl/types/span.h>

constexpr
reference
operator[](size_type i) const noexcept;

Return Value

A reference to the element at index i.

Parameters

Name

Description

i

Index of the element to access.

Created with MrDocs