From 459a8c7a46d1392f04007bf30315dfc86cba7abb Mon Sep 17 00:00:00 2001 From: Stefan Boberg Date: Mon, 26 May 2025 22:34:32 +0200 Subject: made fmt use of format_context more consistent (#409) fixes compilation issues on Linux in some cases --- src/zencore/include/zencore/compactbinaryfmt.h | 3 ++- src/zencore/include/zencore/fmtutils.h | 9 ++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/zencore/include/zencore/compactbinaryfmt.h b/src/zencore/include/zencore/compactbinaryfmt.h index ae0c3eb42..b03683db4 100644 --- a/src/zencore/include/zencore/compactbinaryfmt.h +++ b/src/zencore/include/zencore/compactbinaryfmt.h @@ -14,7 +14,8 @@ template requires DerivedFrom struct fmt::formatter : fmt::formatter { - auto format(const zen::CbObject& a, format_context& ctx) const + template + auto format(const zen::CbObject& a, FormatContext& ctx) const { zen::ExtendableStringBuilder<1024> ObjStr; zen::CompactBinaryToJson(a, ObjStr); diff --git a/src/zencore/include/zencore/fmtutils.h b/src/zencore/include/zencore/fmtutils.h index 10dfa5393..404e570fd 100644 --- a/src/zencore/include/zencore/fmtutils.h +++ b/src/zencore/include/zencore/fmtutils.h @@ -21,7 +21,8 @@ template requires DerivedFrom struct fmt::formatter : fmt::formatter { - auto format(const zen::StringBuilderBase& a, format_context& ctx) const + template + auto format(const zen::StringBuilderBase& a, FormatContext& ctx) const { return fmt::formatter::format(a.ToView(), ctx); } @@ -31,7 +32,8 @@ template requires DerivedFrom struct fmt::formatter : fmt::formatter { - auto format(const zen::NiceBase& a, format_context& ctx) const + template + auto format(const zen::NiceBase& a, FormatContext& ctx) const { return fmt::formatter::format(std::string_view(a), ctx); } @@ -98,7 +100,8 @@ template requires DerivedFrom struct fmt::formatter : fmt::formatter { - auto format(const zen::PathBuilderBase& a, format_context& ctx) const + template + auto format(const zen::PathBuilderBase& a, FormatContext& ctx) const { return fmt::formatter::format(a.ToView(), ctx); } -- cgit v1.2.3