Public Member Functions
zorba::internal::ztd::destroy_delete< T > Struct Template Reference

A deleter class that can be used with unique_ptr. More...

#include <zorba/internal/ztd.h>

List of all members.

Public Member Functions

 destroy_delete ()
template<typename U >
 destroy_delete (destroy_delete< U > const &, typename std::enable_if< ZORBA_TR1_NS::is_convertible< U *, T * >::value >::type *=0)
 Copy constructor.
void operator() (T *p)
 Calls the destroy() member function of the pointed-to object.

Detailed Description

template<typename T>
struct zorba::internal::ztd::destroy_delete< T >

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.

Definition at line 201 of file ztd.h.


Constructor & Destructor Documentation

template<typename T >
zorba::internal::ztd::destroy_delete< T >::destroy_delete ( )
inline

Definition at line 202 of file ztd.h.

template<typename T >
template<typename U >
zorba::internal::ztd::destroy_delete< T >::destroy_delete ( destroy_delete< U > const &  ,
typename std::enable_if< ZORBA_TR1_NS::is_convertible< U *, T * >::value >::type *  = 0 
)
inline

Copy constructor.

Template Parameters:
UThe delete type of the deleter to copy-construct from such that U* is convertible to T*.

Definition at line 211 of file ztd.h.


Member Function Documentation

template<typename T >
void zorba::internal::ztd::destroy_delete< T >::operator() ( T *  p)
inline

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

Parameters:
pA pointer to the object.

Definition at line 222 of file ztd.h.


The documentation for this struct was generated from the following file:
blog comments powered by Disqus