mirror of
https://github.com/MariaDB/server.git
synced 2025-01-15 19:42:28 +01:00
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()) {
This commit is contained in:
parent
4375245d5d
commit
f146ba82c4
1 changed files with 6 additions and 0 deletions
|
@ -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);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue