diff --git a/Source/Core/Common/Crypto/AES.cpp b/Source/Core/Common/Crypto/AES.cpp index a83812ff2e..7d6ddb6463 100644 --- a/Source/Core/Common/Crypto/AES.cpp +++ b/Source/Core/Common/Crypto/AES.cpp @@ -4,6 +4,7 @@ #include "Common/Crypto/AES.h" #include +#include #include #include diff --git a/Source/Core/Common/Logging/Log.h b/Source/Core/Common/Logging/Log.h index 64d353af00..62119c8648 100644 --- a/Source/Core/Common/Logging/Log.h +++ b/Source/Core/Common/Logging/Log.h @@ -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(format); #else auto&& format_str = format; diff --git a/Source/Core/Common/MsgHandler.h b/Source/Core/Common/MsgHandler.h index 4fc7196a97..9c32feeb7f 100644 --- a/Source/Core/Common/MsgHandler.h +++ b/Source/Core/Common/MsgHandler.h @@ -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); auto&& format_str = fmt::format_string(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); -#elif FMT_VERSION >= 90000 - static_assert(fmt::detail::is_compile_string::value); -#else +#if FMT_VERSION < 90000 static_assert(fmt::is_compile_string::value); +#elif FMT_VERSION < 110000 + static_assert(fmt::detail::is_compile_string::value); +#elif FMT_VERSION < 120200 + static_assert(std::is_base_of_v); #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); } diff --git a/Source/Core/Common/TimeUtil.cpp b/Source/Core/Common/TimeUtil.cpp index 93327e9136..e57078b7e9 100644 --- a/Source/Core/Common/TimeUtil.cpp +++ b/Source/Core/Common/TimeUtil.cpp @@ -2,11 +2,13 @@ // SPDX-License-Identifier: GPL-2.0-or-later #include "Common/TimeUtil.h" -#include "Common/Logging/Log.h" +#include #include #include +#include "Common/Logging/Log.h" + namespace Common { std::optional LocalTime(std::time_t time) diff --git a/Source/Core/VideoBackends/OGL/OGLBoundingBox.cpp b/Source/Core/VideoBackends/OGL/OGLBoundingBox.cpp index 9b36a75b63..673e308d53 100644 --- a/Source/Core/VideoBackends/OGL/OGLBoundingBox.cpp +++ b/Source/Core/VideoBackends/OGL/OGLBoundingBox.cpp @@ -3,6 +3,8 @@ #include "VideoBackends/OGL/OGLBoundingBox.h" +#include + #include "VideoBackends/OGL/OGLGfx.h" #include "VideoCommon/DriverDetails.h"