Defined in carb/cpp/Memory.h

template<typename T, std::size_t N>
constexpr void carb::cpp::destroy_at(T (*array)[N]) noexcept

Call the destructor of all array elements.

Template Parameters

T – The element type of the array must have a noexcept destructor. There no mechanism to safely use this function if an element throws. This is a departure from the C++20, wherein an exception thrown from a destructor will result in either std::terminate or an “implementation defined manner.” Instead, we force you to handle potential exceptions by disallowing it.