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

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


Definition

[[nodiscard]] constexpr xte::uz capacity() const noexcept;
Returns the number of elements that can be stored before reallocation is required to hold more.



Example

xte::array array = { 1, 2, 3 };
std::println("{}", array.capacity());
Possible output:
16
[View in Compiler Explorer]