diff options
author | comex <comexk@gmail.com> | 2020-12-29 14:26:16 -0500 |
---|---|---|
committer | comex <comexk@gmail.com> | 2020-12-29 14:33:41 -0500 |
commit | 388cf58b31d6480007901785851e6369b0efe64b (patch) | |
tree | 526f9692f15be9f946511082692420f4971104a8 /src/core | |
parent | 22ba437aa4e77ee2af17501956564338d269da47 (diff) |
k_priority_queue: Fix concepts use
- For `std::same_as`, add missing include of `<concepts>`.
- For `std::convertible_to`, create a replacement in `common/concepts.h`
and use that instead.
This would also be found in `<concepts>`, 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.)
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/hle/kernel/k_priority_queue.h | 8 |
1 files changed, 5 insertions, 3 deletions
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 <array> +#include <concepts> #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 <typename T> concept KPriorityQueueAffinityMask = !std::is_reference_v<T> && requires(T & t) { { t.GetAffinityMask() } - ->std::convertible_to<u64>; + ->Common::ConvertibleTo<u64>; {t.SetAffinityMask(std::declval<u64>())}; { t.GetAffinity(std::declval<int32_t>()) } @@ -48,9 +50,9 @@ concept KPriorityQueueMember = !std::is_reference_v<T> && requires(T & t) { ->KPriorityQueueAffinityMask; { t.GetActiveCore() } - ->std::convertible_to<s32>; + ->Common::ConvertibleTo<s32>; { t.GetPriority() } - ->std::convertible_to<s32>; + ->Common::ConvertibleTo<s32>; }; template <typename Member, size_t _NumCores, int LowestPriority, int HighestPriority> |