Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/Templates
References
| Module | Core |
| Header | /Engine/Source/Runtime/Core/Public/Templates/UnrealTemplate.h |
| Include | #include "Templates/UnrealTemplate.h" |
template<typename T>
std::decay_t< T > CopyTempIfNecessary
(
T && Val
)
Remarks
CopyTempIfNecessary will enforce the creation of a prvalue. This is UE's equivalent of the exposition std::decay-copy: https://eel.is/c++draft/expos.only.func It doesn't static assert like CopyTemp, because it is useful in templates or macros where it's not obvious what the argument is, but you want to create a PR value without stopping compilation.