Common: Fix compile failure with fmt>=11

This commit is contained in:
Ferdinand Bachmann
2025-01-04 18:46:04 +01:00
parent 825092ad33
commit b79bdb13c0
2 changed files with 17 additions and 4 deletions

View File

@ -99,7 +99,13 @@ void GenericLogFmt(LogLevel level, LogType type, const char* file, int line, con
static_assert(NumFields == sizeof...(args),
"Unexpected number of replacement fields in format string; did you pass too few or "
"too many arguments?");
GenericLogFmtImpl(level, type, file, line, format, fmt::make_format_args(args...));
#if FMT_VERSION >= 110000
auto&& format_str = fmt::format_string<Args...>(format);
#else
auto&& format_str = format;
#endif
GenericLogFmtImpl(level, type, file, line, format_str, fmt::make_format_args(args...));
}
} // namespace Common::Log