diff options
| author | 2020-12-29 14:26:16 -0500 | |
|---|---|---|
| committer | 2020-12-29 14:33:41 -0500 | |
| commit | 388cf58b31d6480007901785851e6369b0efe64b (patch) | |
| tree | 526f9692f15be9f946511082692420f4971104a8 /src/common | |
| parent | Merge pull request #5236 from gal20/udp_client_patch (diff) | |
| download | yuzu-388cf58b31d6480007901785851e6369b0efe64b.tar.gz yuzu-388cf58b31d6480007901785851e6369b0efe64b.tar.xz yuzu-388cf58b31d6480007901785851e6369b0efe64b.zip | |
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/common')
| -rw-r--r-- | src/common/concepts.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common/concepts.h b/src/common/concepts.h index 5bef3ad67..aa08065a7 100644 --- a/src/common/concepts.h +++ b/src/common/concepts.h | |||
| @@ -31,4 +31,8 @@ concept DerivedFrom = requires { | |||
| 31 | std::is_convertible_v<const volatile Derived*, const volatile Base*>; | 31 | std::is_convertible_v<const volatile Derived*, const volatile Base*>; |
| 32 | }; | 32 | }; |
| 33 | 33 | ||
| 34 | // TODO: Replace with std::convertible_to when libc++ implements it. | ||
| 35 | template <typename From, typename To> | ||
| 36 | concept ConvertibleTo = std::is_convertible_v<From, To>; | ||
| 37 | |||
| 34 | } // namespace Common | 38 | } // namespace Common |