51 #ifndef __PRM_AutoDeleter_h__
52 #define __PRM_AutoDeleter_h__
58 #include <type_traits>
70 virtual ~prm_Deleter()
76 class prm_ValueDeleter :
public prm_Deleter
88 class prm_ArrayDeleter :
public prm_Deleter
91 prm_ArrayDeleter(
T *array)
100 template <
typename T,
typename CB>
101 class prm_CallbackDeleter :
public prm_Deleter
104 prm_CallbackDeleter(
const CB &callback,
T *
value)
105 : myCallback(callback)
109 ~prm_CallbackDeleter()
override
110 { myCallback(myValue); }
121 template <
typename T>
131 template <
typename T>
143 template <
typename T,
typename CB>
153 std::forward<CB>(callback), pointer));
GLsizei const GLfloat * value
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
exint emplace_back(S &&...s)
T * appendArray(T *array)
UT_UniquePtr< T > UTmakeUnique(REST &&...args)
T * appendCallback(CB &&callback, T *pointer)