MCRO
C++23 utilities for Unreal Engine.
Loading...
Searching...
No Matches
TypeName.h File Reference
#include <string>
#include "CoreMinimal.h"
#include "UnrealCtre.h"
#include "Mcro/Text.h"

Go to the source code of this file.

Namespaces

namespace  Mcro
 
namespace  Mcro::TypeName
 

Functions

template<typename T >
consteval Mcro::Text::FStdStringView GetCompileTimeTypeName ()
 

Variables

template<typename T >
constexpr FStringView Mcro::TypeName::TTypeName
 
template<typename T >
constexpr FStdStringView Mcro::TypeName::TTypeNameStd = GetCompileTimeTypeName<std::decay_t<T>>()
 
template<typename T >
const FName Mcro::TypeName::TTypeFName = FName(TTypeName<T>.Len(), TTypeName<T>.GetData())
 
template<typename T >
const FString Mcro::TypeName::TTypeString = FString(TTypeName<T>.GetData(), TTypeName<T>.Len())
 

Detailed Description

Author
David Mórász
Date
2025

Convert types to string

Definition in file TypeName.h.

Function Documentation

◆ GetCompileTimeTypeName()

template<typename T >
Mcro::Text::FStdStringView GetCompileTimeTypeName ( )
consteval

Get a string view of the compile time typename

Note
Using std::(w)string here instead of FString or FStringView for consteval compatibility
Template Parameters
Ttarget type
Returns
string view of the name of the type

Definition at line 46 of file TypeName.h.