Commit f146ba82 authored by Daniel Black's avatar Daniel Black

MDEV-34206 compile failure: fmt use incompatible with libfmt-10.2.[2]+ (7.1.3 compat)

Preserve compatibility with 7.1.3 by including the previous non-const
function.

The error was:

fmt/format.h:3466:8: note: candidate function template not
viable: no known conversion from 'const formatter<String, [2 * ...]>' to
'formatter<fmt::basic_string_view<char>, [2 * ...]>' for object argument
 3466 |   auto format(const T& val, FormatContext& ctx) ->
decltype(ctx.out()) {
parent 4375245d
......@@ -1386,6 +1386,12 @@ namespace fmt {
string_view name = { c.ptr(), c.length() };
return formatter<string_view>::format(name, ctx);
};
/* needed below function for libfmt-7.1.3 compatibility, (not 9.1.0+) */
template <typename FormatContext>
auto format(String c, FormatContext& ctx) -> decltype(ctx.out()) {
string_view name = { c.ptr(), c.length() };
return formatter<string_view>::format(name, ctx);
};
};
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment