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:
parent
aa6cd82fbc
commit
583432d35b
1 changed files with 9 additions and 0 deletions
|
@ -38,6 +38,8 @@ namespace ircd::mods
|
||||||
struct paths extern paths;
|
struct paths extern paths;
|
||||||
|
|
||||||
std::string demangle(const std::string &symbol);
|
std::string demangle(const std::string &symbol);
|
||||||
|
template<class T> std::string demangle();
|
||||||
|
|
||||||
std::string postfixed(const std::string &name);
|
std::string postfixed(const std::string &name);
|
||||||
std::string unpostfixed(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));
|
return reinterpret_cast<const T *>(ptr<const uint8_t>(name));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<class T>
|
||||||
|
std::string
|
||||||
|
ircd::mods::demangle()
|
||||||
|
{
|
||||||
|
return demangle(typeid(T).name());
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue