Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
UniquePtr.h File Reference
+ Include dependency graph for UniquePtr.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  TDefaultDelete< T >
 
struct  TDefaultDelete< T[]>
 
class  TUniquePtr< T, Deleter >
 
class  TUniquePtr< T[], Deleter >
 
struct  TIsZeroConstructType< TUniquePtr< T > >
 
struct  TIsBitwiseConstructible< TUniquePtr< T >, T * >
 

Functions

template<typename T >
FORCEINLINE bool operator== (TYPE_OF_NULLPTR, const TUniquePtr< T > &Rhs)
 
template<typename T >
FORCEINLINE bool operator!= (TYPE_OF_NULLPTR, const TUniquePtr< T > &Rhs)
 
template<typename T , typename... TArgs>
FORCEINLINE TEnableIf<!TIsArray< T >::Value, TUniquePtr< T > >::Type MakeUnique (TArgs &&... Args)
 
template<typename T , typename... TArgs>
FORCEINLINE TEnableIf<!TIsArray< T >::Value, TUniquePtr< T > >::Type MakeUniqueForOverwrite ()
 
template<typename T >
FORCEINLINE TEnableIf< TIsUnboundedArray< T >::Value, TUniquePtr< T > >::Type MakeUnique (SIZE_T Size)
 
template<typename T >
FORCEINLINE TEnableIf< TIsUnboundedArray< T >::Value, TUniquePtr< T > >::Type MakeUniqueForOverwrite (SIZE_T Size)
 
template<typename T , typename... TArgs>
TEnableIf< TIsBoundedArray< T >::Value, TUniquePtr< T > >::Type MakeUnique (TArgs &&... Args)=delete
 

Variables

template<typename T >
constexpr bool TIsTUniquePtr_V = false
 
template<typename T , typename Deleter >
constexpr bool TIsTUniquePtr_V< TUniquePtr< T, Deleter > > = true
 
template<typename T , typename Deleter >
constexpr bool TIsTUniquePtr_V< const TUniquePtr< T, Deleter > > = true
 
template<typename T , typename Deleter >
constexpr bool TIsTUniquePtr_V< volatile TUniquePtr< T, Deleter > > = true
 
template<typename T , typename Deleter >
constexpr bool TIsTUniquePtr_V< const volatile TUniquePtr< T, Deleter > > = true
 

Function Documentation

◆ MakeUnique() [1/3]

template<typename T >
FORCEINLINE TEnableIf< TIsUnboundedArray< T >::Value, TUniquePtr< T > >::Type MakeUnique ( SIZE_T Size)

Allocates a new array of type T with the given size and returns it as a TUniquePtr. Only enabled for array-type TUniquePtrs. Elements are value-initialized, which will call a user-defined default constructor if it exists, but causes trivial types to be zeroed.

Parameters
SizeThe size of the array to allocate.
Returns
A TUniquePtr which points to a newly-constructed T array of the specified Size.

Definition at line 830 of file UniquePtr.h.

◆ MakeUnique() [2/3]

template<typename T , typename... TArgs>
FORCEINLINE TEnableIf<!TIsArray< T >::Value, TUniquePtr< T > >::Type MakeUnique ( TArgs &&... Args)
delete

Allocates a new object of type T with the given arguments and returns it as a TUniquePtr. Disabled for array-type TUniquePtrs. The object is value-initialized, which will call a user-defined default constructor if it exists, but a trivial type will be zeroed.

Parameters
ArgsThe arguments to pass to the constructor of T.
Returns
A TUniquePtr which points to a newly-constructed T with the specified Args.

Definition at line 802 of file UniquePtr.h.

◆ MakeUnique() [3/3]

template<typename T , typename... TArgs>
TEnableIf< TIsBoundedArray< T >::Value, TUniquePtr< T > >::Type MakeUnique ( TArgs &&... Args)
delete

Overload to cause a compile error when MakeUnique<T[N]> is attempted. Use MakeUnique<T>(N) instead.

Allocates a new object of type T with the given arguments and returns it as a TUniquePtr. Disabled for array-type TUniquePtrs. The object is value-initialized, which will call a user-defined default constructor if it exists, but a trivial type will be zeroed.

Parameters
ArgsThe arguments to pass to the constructor of T.
Returns
A TUniquePtr which points to a newly-constructed T with the specified Args.

Definition at line 802 of file UniquePtr.h.

◆ MakeUniqueForOverwrite() [1/2]

template<typename T , typename... TArgs>
FORCEINLINE TEnableIf<!TIsArray< T >::Value, TUniquePtr< T > >::Type MakeUniqueForOverwrite ( )

Allocates a new object of type T with the given arguments and returns it as a TUniquePtr. Disabled for array-type TUniquePtrs. The object is default-initialized, which will call a user-defined default constructor if it exists, but a trivial type will be uninitialized.

Parameters
ArgsThe arguments to pass to the constructor of T.
Returns
A TUniquePtr which points to a newly-constructed T with the specified Args.

Definition at line 816 of file UniquePtr.h.

◆ MakeUniqueForOverwrite() [2/2]

template<typename T >
FORCEINLINE TEnableIf< TIsUnboundedArray< T >::Value, TUniquePtr< T > >::Type MakeUniqueForOverwrite ( SIZE_T Size)

Allocates a new array of type T with the given size and returns it as a TUniquePtr. Only enabled for array-type TUniquePtrs. Elements are default-initialized, which will call a user-defined default constructor if it exists, but causes trivial types to be left uninitialized.

Parameters
SizeThe size of the array to allocate.
Returns
A TUniquePtr which points to a newly-constructed T array of the specified Size.

Definition at line 845 of file UniquePtr.h.

◆ operator!=()

template<typename T >
FORCEINLINE bool operator!= ( TYPE_OF_NULLPTR ,
const TUniquePtr< T > & Rhs )

Definition at line 773 of file UniquePtr.h.

◆ operator==()

Definition at line 767 of file UniquePtr.h.

Variable Documentation

◆ TIsTUniquePtr_V

template<typename T >
constexpr bool TIsTUniquePtr_V = false
constexpr

Trait which determines whether or not a type is a TUniquePtr.

Definition at line 860 of file UniquePtr.h.

◆ TIsTUniquePtr_V< const TUniquePtr< T, Deleter > >

template<typename T , typename Deleter >
constexpr bool TIsTUniquePtr_V< const TUniquePtr< T, Deleter > > = true
constexpr

Definition at line 862 of file UniquePtr.h.

◆ TIsTUniquePtr_V< const volatile TUniquePtr< T, Deleter > >

template<typename T , typename Deleter >
constexpr bool TIsTUniquePtr_V< const volatile TUniquePtr< T, Deleter > > = true
constexpr

Definition at line 864 of file UniquePtr.h.

◆ TIsTUniquePtr_V< TUniquePtr< T, Deleter > >

template<typename T , typename Deleter >
constexpr bool TIsTUniquePtr_V< TUniquePtr< T, Deleter > > = true
constexpr

Definition at line 861 of file UniquePtr.h.

◆ TIsTUniquePtr_V< volatile TUniquePtr< T, Deleter > >

template<typename T , typename Deleter >
constexpr bool TIsTUniquePtr_V< volatile TUniquePtr< T, Deleter > > = true
constexpr

Definition at line 863 of file UniquePtr.h.