mirror of
https://github.com/matrix-construct/construct
synced 2024-11-12 04:51:08 +01:00
ircd: Move demangle() out of util.
This commit is contained in:
parent
26cd9cec85
commit
71a56fecb7
2 changed files with 10 additions and 11 deletions
|
@ -11,8 +11,7 @@
|
|||
#pragma once
|
||||
#define HAVE_IRCD_DEMANGLE_H
|
||||
|
||||
namespace ircd {
|
||||
inline namespace util
|
||||
namespace ircd
|
||||
{
|
||||
IRCD_EXCEPTION(ircd::error, demangle_error)
|
||||
IRCD_EXCEPTION(demangle_error, not_mangled)
|
||||
|
@ -23,18 +22,18 @@ inline namespace util
|
|||
std::string demangle(const char *const &symbol);
|
||||
template<class T> string_view demangle(const mutable_buffer &out);
|
||||
template<class T> std::string demangle();
|
||||
}}
|
||||
}
|
||||
|
||||
template<class T>
|
||||
std::string
|
||||
ircd::util::demangle()
|
||||
ircd::demangle()
|
||||
{
|
||||
return demangle(typeid(T).name());
|
||||
}
|
||||
|
||||
template<class T>
|
||||
ircd::string_view
|
||||
ircd::util::demangle(const mutable_buffer &out)
|
||||
ircd::demangle(const mutable_buffer &out)
|
||||
{
|
||||
return demangle(out, typeid(T).name());
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ thread_local char
|
|||
outbuf[8192];
|
||||
|
||||
std::string
|
||||
ircd::util::demangle(const char *const &symbol)
|
||||
ircd::demangle(const char *const &symbol)
|
||||
{
|
||||
const string_view demangled
|
||||
{
|
||||
|
@ -25,7 +25,7 @@ ircd::util::demangle(const char *const &symbol)
|
|||
}
|
||||
|
||||
std::string
|
||||
ircd::util::demangle(const string_view &symbol)
|
||||
ircd::demangle(const string_view &symbol)
|
||||
{
|
||||
const string_view demangled
|
||||
{
|
||||
|
@ -36,7 +36,7 @@ ircd::util::demangle(const string_view &symbol)
|
|||
}
|
||||
|
||||
ircd::string_view
|
||||
ircd::util::demangle(const mutable_buffer &out,
|
||||
ircd::demangle(const mutable_buffer &out,
|
||||
const string_view &symbol_)
|
||||
{
|
||||
assert(size(symbol_) < 4096);
|
||||
|
@ -50,7 +50,7 @@ ircd::util::demangle(const mutable_buffer &out,
|
|||
}
|
||||
|
||||
ircd::string_view
|
||||
ircd::util::demangle(const mutable_buffer &out,
|
||||
ircd::demangle(const mutable_buffer &out,
|
||||
const char *const &symbol)
|
||||
{
|
||||
int status(0);
|
||||
|
|
Loading…
Reference in a new issue