0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-28 16:34:13 +01:00

ircd::mods: Add template to demangle by type.

This commit is contained in:
Jason Volk 2017-09-10 08:32:28 -07:00
parent aa6cd82fbc
commit 583432d35b

View file

@ -38,6 +38,8 @@ namespace ircd::mods
struct paths extern paths;
std::string demangle(const std::string &symbol);
template<class T> std::string demangle();
std::string postfixed(const std::string &name);
std::string unpostfixed(const std::string &name);
@ -269,3 +271,10 @@ const
{
return reinterpret_cast<const T *>(ptr<const uint8_t>(name));
}
template<class T>
std::string
ircd::mods::demangle()
{
return demangle(typeid(T).name());
}