Func2

Returns the same type passed to it.

Windows
MacOS
Linux

References

Module

Core

Header

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

Include

#include "Templates/Identity.h"

Syntax

*void Func2
(
    typename TIdentity< T >::Type Val
)

Remarks

Returns the same type passed to it. This is useful in a few cases, but mainly for inhibiting template argument deduction in function arguments, e.g.:

template =""> void Func1(T Val); // Can be called like Func(123) or Func(123);

template =""> /** This traits class is intended to be used in pairs to allow efficient and correct move-aware overloads for generic types. For example:

template =""> void Func(typename TMoveSupportTraits::Copy Obj) { // Copy Obj here }

template =""> /**

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