X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fust-registry-event.hpp;h=5dc98032a2900d58f650bdbdbfa213b90c22164f;hb=11bcbf894cf92b99a2d885cad117db6811f164cb;hp=340c6b455a5b515a70d51cc0ebd2b2ca977dc0f1;hpb=f139a4f9cdbea2b08d08b024ad0996fb5bebad41;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/ust-registry-event.hpp b/src/bin/lttng-sessiond/ust-registry-event.hpp index 340c6b455..5dc98032a 100644 --- a/src/bin/lttng-sessiond/ust-registry-event.hpp +++ b/src/bin/lttng-sessiond/ust-registry-event.hpp @@ -63,17 +63,23 @@ void registry_event_destroy(registry_event *event); } /* namespace sessiond */ } /* namespace lttng */ +/* + * 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 : fmt::formatter { +struct formatter : formatter { template typename FormatCtx::iterator format( const lttng::sessiond::ust::registry_event& event, FormatCtx& ctx) { - return fmt::format_to(ctx.out(), + return format_to(ctx.out(), "{{ name = `{}`, signature = `{}`, id = {}, session objd = {}, channel objd = {} }}", event.name, event.signature, event.id, event.session_objd, event.channel_objd); } }; +} /* namespace fmt */ #endif /* LTTNG_UST_REGISTRY_EVENT_H */