HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_UniquePtr.h File Reference
#include <stddef.h>
#include <memory>
#include <type_traits>
#include <utility>
+ Include dependency graph for UT_UniquePtr.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  UT_UniquePtr< T, Deleter >
 A smart pointer for unique ownership of dynamically allocated objects. More...
 
class  UT_UniquePtr< T, Deleter >
 A smart pointer for unique ownership of dynamically allocated objects. More...
 
class  UT_UniquePtr< T[], Deleter >
 Array specialization of UT_UniquePtr. More...
 
struct  UT::DefaultClearer< T >
 
struct  UT::DefaultClearer< UT_UniquePtr< T > >
 

Namespaces

 UT
 

Functions

template<class T , class... REST>
std::enable_if< !std::is_array
< T >::value, UT_UniquePtr< T >
>::type 
UTmakeUnique (REST &&...args)
 
template<class T >
std::enable_if< std::is_array
< T >::value &&std::extent< T >
::value==0, UT_UniquePtr< T >
>::type 
UTmakeUnique (size_t len)
 
template<class T , class... REST>
std::enable_if< std::extent< T >
::value!=0, void >::type 
UTmakeUnique (REST &&...)=delete
 Construction of arrays of known bound is disallowed. Just do it directly! More...
 

Function Documentation

template<class T , class... REST>
std::enable_if< !std::is_array<T>::value, UT_UniquePtr<T>>::type UTmakeUnique ( REST &&...  args)
inline

Constructs an object of type T and wraps it in an UT_UniquePtr. The args are passed to the constructor of T.

Definition at line 83 of file UT_UniquePtr.h.

template<class T >
std::enable_if< std::is_array<T>::value && std::extent<T>::value == 0, UT_UniquePtr<T>>::type UTmakeUnique ( size_t  len)
inline

Constructs an 1D array of type T with len elements and wraps it in an UT_UniquePtr.

Definition at line 95 of file UT_UniquePtr.h.

template<class T , class... REST>
std::enable_if<std::extent<T>::value != 0, void>::type UTmakeUnique ( REST &&  ...)
delete

Construction of arrays of known bound is disallowed. Just do it directly!