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.
This commit is contained in:
parent
8649c46c74
commit
5000d814af
2 changed files with 56 additions and 72 deletions
|
@ -34,4 +34,12 @@ concept DerivedFrom = requires {
|
|||
template <typename From, typename To>
|
||||
concept ConvertibleTo = std::is_convertible_v<From, To>;
|
||||
|
||||
// No equivalents in the stdlib
|
||||
|
||||
template <typename T>
|
||||
concept IsArithmetic = std::is_arithmetic_v<T>;
|
||||
|
||||
template <typename T>
|
||||
concept IsIntegral = std::is_integral_v<T>;
|
||||
|
||||
} // namespace Common
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue