diff --git a/include/ircd/demangle.h b/include/ircd/demangle.h index b558aca70..4dc387ccb 100644 --- a/include/ircd/demangle.h +++ b/include/ircd/demangle.h @@ -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 string_view demangle(const mutable_buffer &out); template std::string demangle(); -}} +} template std::string -ircd::util::demangle() +ircd::demangle() { return demangle(typeid(T).name()); } template ircd::string_view -ircd::util::demangle(const mutable_buffer &out) +ircd::demangle(const mutable_buffer &out) { return demangle(out, typeid(T).name()); } diff --git a/ircd/demangle.cc b/ircd/demangle.cc index 3053d78b6..c3348b0f4 100644 --- a/ircd/demangle.cc +++ b/ircd/demangle.cc @@ -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,8 +36,8 @@ ircd::util::demangle(const string_view &symbol) } ircd::string_view -ircd::util::demangle(const mutable_buffer &out, - const string_view &symbol_) +ircd::demangle(const mutable_buffer &out, + const string_view &symbol_) { assert(size(symbol_) < 4096); thread_local char symbuf[8192]; @@ -50,8 +50,8 @@ ircd::util::demangle(const mutable_buffer &out, } ircd::string_view -ircd::util::demangle(const mutable_buffer &out, - const char *const &symbol) +ircd::demangle(const mutable_buffer &out, + const char *const &symbol) { int status(0); size_t len(size(out));