1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-06-18 07:47:06 +01:00

Hadrons: type names are demangled

This commit is contained in:
2016-12-14 18:02:18 +00:00
parent 34df71e755
commit ea40854e0b
3 changed files with 35 additions and 26 deletions

View File

@ -63,3 +63,18 @@ std::string Hadrons::sizeString(long unsigned int bytes)
return std::string(buf);
}
// type utilities //////////////////////////////////////////////////////////////
constexpr unsigned int maxNameSize = 1024u;
std::string Hadrons::typeName(const std::type_info *info)
{
char *buf;
std::string name;
buf = abi::__cxa_demangle(info->name(), nullptr, nullptr, nullptr);
name = buf;
free(buf);
return name;
}