Blame 0003-fmt9-is_compile_string-namespace.patch

2daab6c
From 66f330e57316257fe81b46f57dad22ea6dee7bae Mon Sep 17 00:00:00 2001
2daab6c
From: Christopher Rudolph <rudolchr@b-tu.de>
2daab6c
Date: Sat, 9 Jul 2022 17:02:09 +0200
2daab6c
Subject: [PATCH] Add a check for libfmt version so that in case libfmt-9 is
2daab6c
 used the function is_compile_string is called under it's new namespace
2daab6c
2daab6c
---
2daab6c
 Source/Core/Common/MsgHandler.h | 8 ++++++++
2daab6c
 1 file changed, 8 insertions(+)
2daab6c
2daab6c
diff --git a/Source/Core/Common/MsgHandler.h b/Source/Core/Common/MsgHandler.h
2daab6c
index 750da515b0cb..1d6a46785269 100644
2daab6c
--- a/Source/Core/Common/MsgHandler.h
2daab6c
+++ b/Source/Core/Common/MsgHandler.h
2daab6c
@@ -41,7 +41,11 @@ bool MsgAlertFmt(bool yes_no, MsgType style, Common::Log::LogType log_type, cons
2daab6c
   static_assert(NumFields == sizeof...(args),
2daab6c
                 "Unexpected number of replacement fields in format string; did you pass too few or "
2daab6c
                 "too many arguments?");
2daab6c
+#if FMT_VERSION >= 90000
2daab6c
+  static_assert(fmt::detail::is_compile_string<S>::value);
2daab6c
+#else
2daab6c
   static_assert(fmt::is_compile_string<S>::value);
2daab6c
+#endif
2daab6c
   return MsgAlertFmtImpl(yes_no, style, log_type, file, line, format,
2daab6c
                          fmt::make_format_args(args...));
2daab6c
 }
2daab6c
@@ -56,7 +60,11 @@ bool MsgAlertFmtT(bool yes_no, MsgType style, Common::Log::LogType log_type, con
2daab6c
   static_assert(NumFields == sizeof...(args),
2daab6c
                 "Unexpected number of replacement fields in format string; did you pass too few or "
2daab6c
                 "too many arguments?");
2daab6c
+#if FMT_VERSION >= 90000
2daab6c
+  static_assert(fmt::detail::is_compile_string<S>::value);
2daab6c
+#else
2daab6c
   static_assert(fmt::is_compile_string<S>::value);
2daab6c
+#endif
2daab6c
   auto arg_list = fmt::make_format_args(args...);
2daab6c
   return MsgAlertFmtImpl(yes_no, style, log_type, file, line, translated_format, arg_list);
2daab6c
 }