diff --git a/Source/Core/Core/HLE/HLE_VarArgs.cpp b/Source/Core/Core/HLE/HLE_VarArgs.cpp index b16d1dfd32d..148215d4172 100644 --- a/Source/Core/Core/HLE/HLE_VarArgs.cpp +++ b/Source/Core/Core/HLE/HLE_VarArgs.cpp @@ -6,6 +6,7 @@ #include "Common/Logging/Log.h" #include "Core/Core.h" +#include "Core/PowerPC/PowerPC.h" #include "Core/System.h" HLE::SystemVABI::VAList::~VAList() = default; diff --git a/Source/Core/Core/HLE/HLE_VarArgs.h b/Source/Core/Core/HLE/HLE_VarArgs.h index c1a9f0a7707..e1f7c55090c 100644 --- a/Source/Core/Core/HLE/HLE_VarArgs.h +++ b/Source/Core/Core/HLE/HLE_VarArgs.h @@ -9,7 +9,6 @@ #include "Common/CommonTypes.h" #include "Core/PowerPC/MMU.h" -#include "Core/PowerPC/PowerPC.h" namespace Core { @@ -19,15 +18,14 @@ class System; namespace HLE::SystemVABI { -// SFINAE template -constexpr bool IS_ARG_POINTER = std::is_union() || std::is_class(); +concept ArgPointer = std::is_union_v || std::is_class_v; template -constexpr bool IS_WORD = std::is_pointer() || (std::is_integral() && sizeof(T) <= 4); +concept ArgWord = std::is_pointer_v || (std::is_integral_v && sizeof(T) <= 4); template -constexpr bool IS_DOUBLE_WORD = std::is_integral() && sizeof(T) == 8; +concept ArgDoubleWord = std::is_integral_v && sizeof(T) == 8; template -constexpr bool IS_ARG_REAL = std::is_floating_point(); +concept ArgReal = std::is_floating_point_v; // See System V ABI (SVR4) for more details // -> 3-18 Parameter Passing @@ -47,7 +45,7 @@ public: virtual ~VAList(); // 0 - arg_ARGPOINTER - template >* = nullptr> + template T GetArg() { T obj; @@ -62,7 +60,7 @@ public: } // 1 - arg_WORD - template >* = nullptr> + template T GetArg() { static_assert(!std::is_pointer(), "VAList doesn't support pointers"); @@ -84,7 +82,7 @@ public: } // 2 - arg_DOUBLEWORD - template >* = nullptr> + template T GetArg() { u64 value; @@ -107,7 +105,7 @@ public: } // 3 - arg_ARGREAL - template >* = nullptr> + template T GetArg() { double value;