6#ifndef INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_MEMORY_DESTROY_AT_HPP_
7#define INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_MEMORY_DESTROY_AT_HPP_
14#include "arene/base/stdlib_choice/addressof.hpp"
15#include "arene/base/stdlib_choice/enable_if.hpp"
16#include "arene/base/stdlib_choice/is_array.hpp"
21namespace destroy_at_detail {
31 template <typename T, constraints<std::enable_if_t<!std::is_array<T>::value>> =
nullptr>
32 void operator()(T* ptr)
const noexcept {
41 template <typename T, constraints<std::enable_if_t<std::is_array<T>::value>> =
nullptr>
43 void operator()(T* ptr)
const noexcept {
46 for (
auto& element : *ptr) {
#define ARENE_CPP14_INLINE_VARIABLE(type, name)
Emulates C++17's inline variable declarations for function objects.
Definition cpp14_inline.hpp:69
Definition accumulate.hpp:37
Definition accumulate.hpp:36
constexpr auto addressof(T &value) noexcept -> T *
Obtains the actual address of the object or function arg, even in presence of overloaded operator&.
Definition addressof.hpp:24