From 82d057345b2aec1d0e3963717a4855d6c81c0026 Mon Sep 17 00:00:00 2001 From: Francisco Date: Mon, 30 Nov 2020 14:59:15 +0000 Subject: [PATCH] fix compilation issue with user-defined fmt formatter --- lib/include/srslte/common/tti_point.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/include/srslte/common/tti_point.h b/lib/include/srslte/common/tti_point.h index 59fa3df29..0f2db24f7 100644 --- a/lib/include/srslte/common/tti_point.h +++ b/lib/include/srslte/common/tti_point.h @@ -113,15 +113,21 @@ using tti_interval = srslte::interval; } // namespace srslte +namespace fmt { template <> -struct fmt::formatter : public fmt::formatter { - // parse is inherited from formatter. +struct formatter { + template + auto parse(ParseContext& ctx) -> decltype(ctx.begin()) + { + return ctx.begin(); + } template - auto format(srslte::tti_point tti, FormatContext& ctx) -> decltype(format_to(ctx.out(), "")) + auto format(srslte::tti_point tti, FormatContext& ctx) -> decltype(std::declval().out()) { return format_to(ctx.out(), "{}", tti.to_uint()); } }; +} // namespace fmt namespace srsenb {