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

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


Definition

constexpr void reset() & noexcept;
Destroys stored elements in order, deallocates claimed memory, and resets .data() to nullptr, .size() to 0, and .capacity() to 0.



Example

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