xte::array<T>::operator[]()

Defined in header <xte/data/array.hpp>


Definition

[[nodiscard]] constexpr auto&& operator[](this auto&& self, xte::uz index) noexcept;
Accesses an element at the given index, copying qualifiers from self.



Example

xte::array array = { 1, 2, 3 };
std::println("{}", array[1]);
Output:
2
[View in Compiler Explorer]