zorba::internal::ztd::destroy_delete

#include <zorba/internal/ztd.h>

A deleter class that can be used with unique_ptr. Instead of calling delete on the pointed-to object, it calls its destroy() member function.

Public Functions

destroy_delete()

destroy_delete(destroy_delete< U > const &, typename std::enable_if< ZORBA_TR1_NS::is_convertible< U *, T * >::value >::type *=nullptr)

Copy constructor.

void

operator()(T *p)

Calls the destroy() member function of the pointed-to object.

Public Functions

destroy_delete

 destroy_delete()

destroy_delete

 destroy_delete(destroy_delete< U > const &, typename std::enable_if< ZORBA_TR1_NS::is_convertible< U *, T * >::value >::type *=nullptr)

Copy constructor.

Parameters

U The delete type of the deleter to copy-construct from such that U* is convertible to T*.

operator()

void operator()(T *p)

Calls the destroy() member function of the pointed-to object.

Parameters

p A pointer to the object.