AK: Loosen FixedPoint template contraints and forward-declare it

Because AK/Concepts.h includes AK/Forward.h and concepts cannot be
forward declared, slightly losen the FixedPoint template arguments
so that we can forward declare it in AK/Forward.h
This commit is contained in:
Tom 2021-12-27 18:18:53 -07:00 committed by Linus Groh
parent 92e337de21
commit 77b3230c80
2 changed files with 6 additions and 1 deletions

View file

@ -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;

View file

@ -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;