mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-07-02 16:43:02 -05:00
fmt: Allow building with version >=12.2.0
This change was causing some issues: > Made FMT_STRING a no-op when FMT_USE_CONSTEVAL is enabled, since the consteval format-string constructor already provides compile-time validation (#4611, #4612). Thanks @friedkeenan.
This commit is contained in:
parent
32ee8ad7ca
commit
e97b1cd759
|
|
@ -103,8 +103,9 @@ 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?");
|
||||
|
||||
#if FMT_VERSION >= 110000
|
||||
#if FMT_VERSION >= 110000 && FMT_VERSION < 120200
|
||||
// fmt 11 made fmt::string_view no longer directly constructible from compile-time strings.
|
||||
// In fmt 12.2+, compile-time strings are plain string literals, so this is no longer needed.
|
||||
auto&& format_str = fmt::format_string<Args...>(format);
|
||||
#else
|
||||
auto&& format_str = format;
|
||||
|
|
|
|||
|
|
@ -39,7 +39,10 @@ bool MsgAlertFmt(bool yes_no, MsgType style, Common::Log::LogType log_type, cons
|
|||
static_assert(NumFields == sizeof...(args),
|
||||
"Unexpected number of replacement fields in format string; did you pass too few or "
|
||||
"too many arguments?");
|
||||
#if FMT_VERSION >= 110000
|
||||
|
||||
#if FMT_VERSION >= 120200
|
||||
auto&& format_str = format;
|
||||
#elif 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
|
||||
|
|
@ -63,13 +66,14 @@ bool MsgAlertFmtT(bool yes_no, MsgType style, Common::Log::LogType log_type, con
|
|||
static_assert(NumFields == sizeof...(args),
|
||||
"Unexpected number of replacement fields in format string; did you pass too few or "
|
||||
"too many arguments?");
|
||||
#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);
|
||||
#else
|
||||
#if FMT_VERSION < 90000
|
||||
static_assert(fmt::is_compile_string<S>::value);
|
||||
#elif FMT_VERSION < 110000
|
||||
static_assert(fmt::detail::is_compile_string<S>::value);
|
||||
#elif FMT_VERSION < 120200
|
||||
static_assert(std::is_base_of_v<fmt::detail::compile_string, S>);
|
||||
#endif
|
||||
// FMT 12.2+ guarantees this will be a compile-time string
|
||||
auto arg_list = fmt::make_format_args(args...);
|
||||
return MsgAlertFmtImpl(yes_no, style, log_type, file, line, translated_format, arg_list);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user