diff options
Diffstat (limited to 'AK')
-rw-r--r-- | AK/FixedPoint.h | 3 | ||||
-rw-r--r-- | AK/Forward.h | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/AK/FixedPoint.h b/AK/FixedPoint.h index f50e514b35..a67aa81f0c 100644 --- a/AK/FixedPoint.h +++ b/AK/FixedPoint.h @@ -14,7 +14,8 @@ namespace AK { // FIXME: this always uses round to nearest break-tie to even -template<size_t precision, Integral Underlying = i32> +// FIXME: use the Integral concept to constrain Underlying +template<size_t precision, typename Underlying> class FixedPoint { using This = FixedPoint<precision, Underlying>; constexpr static Underlying radix_mask = (1 << precision) - 1; diff --git a/AK/Forward.h b/AK/Forward.h index 638ffaa6d8..1a682745bf 100644 --- a/AK/Forward.h +++ b/AK/Forward.h @@ -90,6 +90,9 @@ class Badge; template<typename T> class FixedArray; +template<size_t precision, typename Underlying = i32> +class FixedPoint; + template<typename> class Function; @@ -144,6 +147,7 @@ using AK::DuplexMemoryStream; using AK::Error; using AK::ErrorOr; using AK::FixedArray; +using AK::FixedPoint; using AK::FlyString; using AK::Function; using AK::GenericLexer; |