From 66f330e57316257fe81b46f57dad22ea6dee7bae Mon Sep 17 00:00:00 2001 From: Christopher Rudolph Date: Sat, 9 Jul 2022 17:02:09 +0200 Subject: [PATCH] Add a check for libfmt version so that in case libfmt-9 is used the function is_compile_string is called under it's new namespace --- Source/Core/Common/MsgHandler.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Source/Core/Common/MsgHandler.h b/Source/Core/Common/MsgHandler.h index 750da515b0..1d6a467852 100644 --- a/Source/Core/Common/MsgHandler.h +++ b/Source/Core/Common/MsgHandler.h @@ -41,7 +41,11 @@ 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 >= 90000 + static_assert(fmt::detail::is_compile_string::value); +#else static_assert(fmt::is_compile_string::value); +#endif return MsgAlertFmtImpl(yes_no, style, log_type, file, line, format, fmt::make_format_args(args...)); } @@ -56,7 +60,11 @@ 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 >= 90000 + static_assert(fmt::detail::is_compile_string::value); +#else static_assert(fmt::is_compile_string::value); +#endif auto arg_list = fmt::make_format_args(args...); return MsgAlertFmtImpl(yes_no, style, log_type, file, line, translated_format, arg_list); }