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

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


Definition

constexpr void erase(xte::uz index, xte::uz count = 1) & noexcept;
Starting at the given index, destroys the given number of elements, in order.



Example

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