Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/Templates
References
| Module | Core |
| Header | /Engine/Source/Runtime/Core/Public/Templates/UniqueObj.h |
| Include | #include "Templates/UniqueObj.h" |
Syntax
template<typename T>
class TUniqueObj
Remarks
This is essentially a reference version of TUniquePtr Useful to force heap allocation of a value, e.g. in a TMap to give similar behaviour to TIndirectArray
Constructors
| Type | Name | Description | |
|---|---|---|---|
TUniqueObj
(
const TUniqueObj& other |
|||
TUniqueObj
(
TUniqueObj&& other |
As TUniqueObj's internal pointer can never be null, we can't move that On the other hand we can call the move constructor of "T" | ||
TUniqueObj
(
Args&&... args |
Functions
Operators
| Type | Name | Description | |
|---|---|---|---|
| T & | operator* () |
||
| const T & | operator* () |
||
| TUniqueObj & | operator=
(
const TUniqueObj& |
Disallow copy-assignment. | |
| TUniqueObj & | operator=
(
TUniqueObj&& other |
Move-assignment is implemented as swapping the internal pointer. | |
| TUniqueObj & | operator=
(
Arg&& other |
||
| T * | operator-> () |
||
| const T * | operator-> () |
Typedefs
| Name | Description |
|---|---|
| ElementType |