GetGeneratedTypeName

Returns a pointer to a static string representing the name of the type, e.g.:

Windows
MacOS
Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Misc/GeneratedTypeName.h

Include

#include "Misc/GeneratedTypeName.h"

Syntax

template<typename T>
const TCHAR * GetGeneratedTypeName()

Remarks

Returns a pointer to a static string representing the name of the type, e.g.:

const TCHAR* FStringName = GetGeneratedTypeName() // "FString"

Caveats:

  • The strings are compiler-dependent and thus non-portable, and so shouldn't be saved or relied upon as a form of identity, e.g. the example above returns "class FString" on MSVC.

  • Default template parameters are also handled differently by different compilers, sometimes ignored, sometimes not.

  • Only the concrete type is known to the compiler, aliases are ignored, e.g. GetTypeName() typically returns "wchar_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