Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/Templates > API/Runtime/Core/Templates/MakeUniqueForOverwrite
References
| Module | Core |
| Header | /Engine/Source/Runtime/Core/Public/Templates/UniquePtr.h |
| Include | #include "Templates/UniquePtr.h" |
template<typename T, typename... TArgs, std::enable_if_t<(!std::is_array_v< T >), int >>
TUniquePtr < T > MakeUniqueForOverwrite()
Remarks
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. A TUniquePtr which points to a newly-constructed T with the specified Args.
Parameters
| Name | Description |
|---|---|
| Args | The arguments to pass to the constructor of T. |