aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2025-05-26 22:34:32 +0200
committerGitHub Enterprise <[email protected]>2025-05-26 22:34:32 +0200
commit459a8c7a46d1392f04007bf30315dfc86cba7abb (patch)
treec4fe2e6232237d8650554712b8d72e39c9d22811 /src
parentunblock cache bucket drop (#406) (diff)
downloadzen-459a8c7a46d1392f04007bf30315dfc86cba7abb.tar.xz
zen-459a8c7a46d1392f04007bf30315dfc86cba7abb.zip
made fmt use of format_context more consistent (#409)
fixes compilation issues on Linux in some cases
Diffstat (limited to 'src')
-rw-r--r--src/zencore/include/zencore/compactbinaryfmt.h3
-rw-r--r--src/zencore/include/zencore/fmtutils.h9
2 files changed, 8 insertions, 4 deletions
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<typename T>
requires DerivedFrom<T, zen::CbObjectView>
struct fmt::formatter<T> : fmt::formatter<std::string_view>
{
- auto format(const zen::CbObject& a, format_context& ctx) const
+ template<typename FormatContext>
+ 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<typename T>
requires DerivedFrom<T, zen::StringBuilderBase>
struct fmt::formatter<T> : fmt::formatter<std::string_view>
{
- auto format(const zen::StringBuilderBase& a, format_context& ctx) const
+ template<typename FormatContext>
+ auto format(const zen::StringBuilderBase& a, FormatContext& ctx) const
{
return fmt::formatter<std::string_view>::format(a.ToView(), ctx);
}
@@ -31,7 +32,8 @@ template<typename T>
requires DerivedFrom<T, zen::NiceBase>
struct fmt::formatter<T> : fmt::formatter<std::string_view>
{
- auto format(const zen::NiceBase& a, format_context& ctx) const
+ template<typename FormatContext>
+ auto format(const zen::NiceBase& a, FormatContext& ctx) const
{
return fmt::formatter<std::string_view>::format(std::string_view(a), ctx);
}
@@ -98,7 +100,8 @@ template<typename T>
requires DerivedFrom<T, zen::PathBuilderBase>
struct fmt::formatter<T> : fmt::formatter<std::string_view>
{
- auto format(const zen::PathBuilderBase& a, format_context& ctx) const
+ template<typename FormatContext>
+ auto format(const zen::PathBuilderBase& a, FormatContext& ctx) const
{
return fmt::formatter<std::string_view>::format(a.ToView(), ctx);
}