CopyTemp

CopyTemp will enforce the creation of an rvalue which can bind to rvalue reference parameters.

Windows
MacOS
Linux

References

Module

Core

Header

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

Include

#include "Templates/UnrealTemplate.h"

Syntax

template<typename T>
T CopyTemp
(
    T & Val
)

Remarks

CopyTemp will enforce the creation of an rvalue which can bind to rvalue reference parameters. Unlike MoveTemp, the source object will never be modifed. (i.e. a copy will be made) There is no std:: equivalent.

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