xte::fixed_array<T, n>::size

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


Definition

static constexpr auto size = xte::wrap_value<n>();
Keeps the number of stored elements, n. Implicitly convertible to xte::uz, and callable, as to emulate a member function.



Example

xte::fixed_array array = { 1, 2, 3 };
std::println("{}", array.size());

std::println("{}", xte::fixed_array<int, 42>::size);
Output:
3
42
[View in Compiler Explorer]