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

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


Definition

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



Example

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