13 #include <type_traits>
33 ::std::string
demangle(const ::std::string& mangled);
43 #if defined(__clang__)
44 const ::std::string prefix =
"[T = ";
45 const ::std::string suffix =
"]";
46 const ::std::string
function = __PRETTY_FUNCTION__;
47 #elif defined(__GNUC__)
48 const ::std::string prefix =
"with T = ";
49 const ::std::string suffix =
"; ";
50 const ::std::string
function = __PRETTY_FUNCTION__;
51 #elif defined(__MSC_VER)
52 const ::std::string prefix =
"get_type_name<";
53 const ::std::string suffix =
">(void)";
54 const ::std::string
function = __FUNCSIG__;
56 const ::std::string prefix =
"";
57 const ::std::string suffix =
"";
61 const auto start =
function.find(prefix) + prefix.size();
62 const auto end =
function.find(suffix);
63 const auto size = end -
start;
73 ::std::string
getTypeName(const ::std::type_info& typeInfo);