From 77b3230c806d3ee8d5ceb50b60a1ed88ba62d737 Mon Sep 17 00:00:00 2001 From: Tom Date: Mon, 27 Dec 2021 18:18:53 -0700 Subject: [PATCH] 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 --- AK/FixedPoint.h | 3 ++- AK/Forward.h | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/AK/FixedPoint.h b/AK/FixedPoint.h index f50e514b351..a67aa81f0cf 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 +// FIXME: use the Integral concept to constrain Underlying +template class FixedPoint { using This = FixedPoint; constexpr static Underlying radix_mask = (1 << precision) - 1; diff --git a/AK/Forward.h b/AK/Forward.h index 638ffaa6d8f..1a682745bf4 100644 --- a/AK/Forward.h +++ b/AK/Forward.h @@ -90,6 +90,9 @@ class Badge; template class FixedArray; +template +class FixedPoint; + template 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;