From 388cf58b31d6480007901785851e6369b0efe64b Mon Sep 17 00:00:00 2001 From: comex Date: Tue, 29 Dec 2020 14:26:16 -0500 Subject: k_priority_queue: Fix concepts use - For `std::same_as`, add missing include of ``. - For `std::convertible_to`, create a replacement in `common/concepts.h` and use that instead. This would also be found in ``, but unlike `std::same_as`, `std::convertible_to` is not yet implemented in libc++, LLVM's STL implementation - not even in master. (In fact, `std::same_as` is the *only* concept currently implemented. For some reason.) --- src/core/hle/kernel/k_priority_queue.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/core/hle') diff --git a/src/core/hle/kernel/k_priority_queue.h b/src/core/hle/kernel/k_priority_queue.h index 01a577d0c..99fb8fe93 100644 --- a/src/core/hle/kernel/k_priority_queue.h +++ b/src/core/hle/kernel/k_priority_queue.h @@ -8,11 +8,13 @@ #pragma once #include +#include #include "common/assert.h" #include "common/bit_set.h" #include "common/bit_util.h" #include "common/common_types.h" +#include "common/concepts.h" namespace Kernel { @@ -21,7 +23,7 @@ class Thread; template concept KPriorityQueueAffinityMask = !std::is_reference_v && requires(T & t) { { t.GetAffinityMask() } - ->std::convertible_to; + ->Common::ConvertibleTo; {t.SetAffinityMask(std::declval())}; { t.GetAffinity(std::declval()) } @@ -48,9 +50,9 @@ concept KPriorityQueueMember = !std::is_reference_v && requires(T & t) { ->KPriorityQueueAffinityMask; { t.GetActiveCore() } - ->std::convertible_to; + ->Common::ConvertibleTo; { t.GetPriority() } - ->std::convertible_to; + ->Common::ConvertibleTo; }; template -- cgit v1.2.3