xte::fixed_array<T, n>::get()

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


Definition

template<xte::uz index>
[[nodiscard]] constexpr auto&& get(this auto&& self) noexcept;
Accesses an element at the given index, copying qualifiers from self. Used for structured binding.



Example

auto [a, b, c] = xte::fixed_array { 1, 2, 3 };
std::println("{} {} {}", a, b, c);
Output:
1 2 3
[View in Compiler Explorer]