Build fix: missing initializer for member 'rotation_positions'
[lttng-tools.git] / src / common / format.hpp
index 73b363408f49cf499f326f601c1bdd0cd8835478..020766eb5ddd788dfd7c8114a6bd993e7817cfdf 100644 (file)
@@ -19,19 +19,25 @@ DIAGNOSTIC_IGNORE_DUPLICATED_BRANCHES
 #include <vendor/fmt/core.h>
 DIAGNOSTIC_POP
 
+/*
+ * Due to a bug in g++ < 7.1, this specialization must be enclosed in the fmt namespace,
+ * see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56480.
+ */
+namespace fmt {
 template <>
-struct fmt::formatter<std::type_info> : fmt::formatter<std::string> {
+struct formatter<std::type_info> : formatter<std::string> {
        template <typename FormatCtx>
        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<std::string>::format(demangled_name, ctx) :
-                                             fmt::formatter<std::string>::format(type_info.name(), ctx);
+               auto it = status == 0 ? formatter<std::string>::format(demangled_name, ctx) :
+                                       formatter<std::string>::format(type_info.name(), ctx);
 
                free(demangled_name);
                return it;
        }
 };
+} /* namespace fmt */
 
 #endif /* LTTNG_FORMAT_H */
This page took 0.023216 seconds and 4 git commands to generate.