mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 12:05:15 +00:00
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:
parent
92e337de21
commit
77b3230c80
Notes:
sideshowbarker
2024-07-17 20:21:49 +09:00
Author: https://github.com/tomuta Commit: https://github.com/SerenityOS/serenity/commit/77b3230c806 Pull-request: https://github.com/SerenityOS/serenity/pull/11439 Reviewed-by: https://github.com/kleinesfilmroellchen Reviewed-by: https://github.com/linusg ✅
2 changed files with 6 additions and 1 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue