+/*
+ * 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 formatter<ust_app> : formatter<std::string> {
+ template <typename FormatCtx>
+ typename FormatCtx::iterator format(const ust_app& app, FormatCtx& ctx)
+ {
+ return format_to(ctx.out(),
+ "{{ procname = `{}`, ppid = {}, pid = {}, uid = {}, gid = {}, version = {}.{}, registration time = {} }}",
+ app.name, app.ppid, app.pid, app.uid, app.gid, app.v_major,
+ app.v_minor,
+ lttng::utils::time_to_iso8601_str(app.registration_time));
+ }
+};
+} /* namespace fmt */
+