mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-09 07:39:26 +01:00
Common: Fix compile failure with fmt>=11
This commit is contained in:
parent
825092ad33
commit
b79bdb13c0
@ -99,7 +99,13 @@ void GenericLogFmt(LogLevel level, LogType type, const char* file, int line, con
|
|||||||
static_assert(NumFields == sizeof...(args),
|
static_assert(NumFields == sizeof...(args),
|
||||||
"Unexpected number of replacement fields in format string; did you pass too few or "
|
"Unexpected number of replacement fields in format string; did you pass too few or "
|
||||||
"too many arguments?");
|
"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
|
} // namespace Common::Log
|
||||||
|
|
||||||
|
@ -41,12 +41,17 @@ bool MsgAlertFmt(bool yes_no, MsgType style, Common::Log::LogType log_type, cons
|
|||||||
static_assert(NumFields == sizeof...(args),
|
static_assert(NumFields == sizeof...(args),
|
||||||
"Unexpected number of replacement fields in format string; did you pass too few or "
|
"Unexpected number of replacement fields in format string; did you pass too few or "
|
||||||
"too many arguments?");
|
"too many arguments?");
|
||||||
#if FMT_VERSION >= 90000
|
#if FMT_VERSION >= 110000
|
||||||
|
static_assert(std::is_base_of_v<fmt::detail::compile_string, S>);
|
||||||
|
auto&& format_str = fmt::format_string<Args...>(format);
|
||||||
|
#elif FMT_VERSION >= 90000
|
||||||
static_assert(fmt::detail::is_compile_string<S>::value);
|
static_assert(fmt::detail::is_compile_string<S>::value);
|
||||||
|
auto&& format_str = format;
|
||||||
#else
|
#else
|
||||||
static_assert(fmt::is_compile_string<S>::value);
|
static_assert(fmt::is_compile_string<S>::value);
|
||||||
|
auto&& format_str = format;
|
||||||
#endif
|
#endif
|
||||||
return MsgAlertFmtImpl(yes_no, style, log_type, file, line, format,
|
return MsgAlertFmtImpl(yes_no, style, log_type, file, line, format_str,
|
||||||
fmt::make_format_args(args...));
|
fmt::make_format_args(args...));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -60,7 +65,9 @@ bool MsgAlertFmtT(bool yes_no, MsgType style, Common::Log::LogType log_type, con
|
|||||||
static_assert(NumFields == sizeof...(args),
|
static_assert(NumFields == sizeof...(args),
|
||||||
"Unexpected number of replacement fields in format string; did you pass too few or "
|
"Unexpected number of replacement fields in format string; did you pass too few or "
|
||||||
"too many arguments?");
|
"too many arguments?");
|
||||||
#if FMT_VERSION >= 90000
|
#if FMT_VERSION >= 110000
|
||||||
|
static_assert(std::is_base_of_v<fmt::detail::compile_string, S>);
|
||||||
|
#elif FMT_VERSION >= 90000
|
||||||
static_assert(fmt::detail::is_compile_string<S>::value);
|
static_assert(fmt::detail::is_compile_string<S>::value);
|
||||||
#else
|
#else
|
||||||
static_assert(fmt::is_compile_string<S>::value);
|
static_assert(fmt::is_compile_string<S>::value);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user