Skip to content

ludus::foundation::core::Deleter

Ludus Wiki · API overview · Browse API

Concept

A nothrow value deleter that can destroy an ElementType*.
Satisfied when DeleterType is a non-cv object type that is nothrow destructible and whose lvalue is nothrow callable with an ElementType*. Reference deleters are excluded. Individual UniquePtr operations add the nothrow construction, move or assignment requirements they perform.

Declared in modules/foundation/base/include/ludus/foundation/base/pointer.hpp

#include <ludus/foundation/base/pointer.hpp>
template<typename DeleterType, typename ElementType>
concept ludus::foundation::core::Deleter =  std::is_object_v<DeleterType> && std::is_same_v<DeleterType, std::remove_cv_t<DeleterType>> &&
                  std::is_nothrow_destructible_v<DeleterType> && requires(DeleterType& deleter, ElementType* pointer) {
                      { deleter(pointer) } noexcept;
                  }