MakeUnique

Overload to cause a compile error when MakeUnique is attempted.

Windows
MacOS
Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Templates/UniquePtr.h

Include

#include "Templates/UniquePtr.h"

Syntax

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

Remarks

Overload to cause a compile error when MakeUnique is attempted. Use MakeUnique(N) instead.

Allocates a new object of type T with the given arguments and returns it as a TUniquePtr. Disabled for array-type TUniquePtrs.

Returns

A TUniquePtr which points to a newly-constructed T with the specified Args.

Parameters

Parameter

Description

Args

The arguments to pass to the constructor of T.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss