xte::array<T>::front()

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


Definition

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



Example

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