diff options
| author | 2022-10-18 12:54:53 -0400 | |
|---|---|---|
| committer | 2022-10-18 16:06:46 -0400 | |
| commit | 5000d814afeefd7eb7f250888b76d6723790f762 (patch) | |
| tree | 116a8a0a087c14e8131e7d4b9dbe740ff4e65d5f /src/common/concepts.h | |
| parent | Merge pull request #9054 from Docteh/just_lz4 (diff) | |
| download | yuzu-5000d814afeefd7eb7f250888b76d6723790f762.tar.gz yuzu-5000d814afeefd7eb7f250888b76d6723790f762.tar.xz yuzu-5000d814afeefd7eb7f250888b76d6723790f762.zip | |
fixed_point: Use variable templates and concepts where applicable
Makes a few things a little less noisy and removes the need for SFINAE
in quite a few functions.
Diffstat (limited to 'src/common/concepts.h')
| -rw-r--r-- | src/common/concepts.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/common/concepts.h b/src/common/concepts.h index a97555f6a..e8ce30dfe 100644 --- a/src/common/concepts.h +++ b/src/common/concepts.h | |||
| @@ -34,4 +34,12 @@ concept DerivedFrom = requires { | |||
| 34 | template <typename From, typename To> | 34 | template <typename From, typename To> |
| 35 | concept ConvertibleTo = std::is_convertible_v<From, To>; | 35 | concept ConvertibleTo = std::is_convertible_v<From, To>; |
| 36 | 36 | ||
| 37 | // No equivalents in the stdlib | ||
| 38 | |||
| 39 | template <typename T> | ||
| 40 | concept IsArithmetic = std::is_arithmetic_v<T>; | ||
| 41 | |||
| 42 | template <typename T> | ||
| 43 | concept IsIntegral = std::is_integral_v<T>; | ||
| 44 | |||
| 37 | } // namespace Common | 45 | } // namespace Common |