X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fcommon%2Fformat.hpp;h=dace2c027b31a1d9926f63c0fb55f3f4e4f5ed95;hb=e2c2bec23d72b09ef5778dff54fa6ca4a34587bf;hp=73b363408f49cf499f326f601c1bdd0cd8835478;hpb=65cd3c0cfa205aa6f67ff974f561882d5eafdd89;p=lttng-tools.git diff --git a/src/common/format.hpp b/src/common/format.hpp index 73b363408..dace2c027 100644 --- a/src/common/format.hpp +++ b/src/common/format.hpp @@ -19,19 +19,21 @@ DIAGNOSTIC_IGNORE_DUPLICATED_BRANCHES #include DIAGNOSTIC_POP +namespace fmt { template <> -struct fmt::formatter : fmt::formatter { +struct formatter : formatter { template typename FormatCtx::iterator format(const std::type_info& type_info, FormatCtx& ctx) { int status; auto demangled_name = abi::__cxa_demangle(type_info.name(), nullptr, 0, &status); - auto it = status == 0 ? fmt::formatter::format(demangled_name, ctx) : - fmt::formatter::format(type_info.name(), ctx); + auto it = status == 0 ? formatter::format(demangled_name, ctx) : + formatter::format(type_info.name(), ctx); free(demangled_name); return it; } }; +} /* namespace fmt */ #endif /* LTTNG_FORMAT_H */