Module |
|
Header |
/Engine/Source/Runtime/Core/Public/Misc/GeneratedTypeName.h |
Include |
#include "Misc/GeneratedTypeName.h" |
template<typename T>
const TCHAR * GetGeneratedTypeName()
Returns a pointer to a static string representing the name of the type, e.g.:
const TCHAR* FStringName = GetGeneratedTypeName
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".