1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 09:47:35 +00:00

AK: Make truncating UFixedBigInts constexpr

Also add some tests and shift tests while we're at it.
This commit is contained in:
davidot 2022-10-10 02:30:29 +02:00 committed by Linus Groh
parent 66d07a452f
commit bf6d4a5cbf
2 changed files with 16 additions and 1 deletions

View file

@ -87,7 +87,7 @@ public:
}
template<Unsigned U>
requires(sizeof(T) >= sizeof(U)) explicit operator U() const
requires(sizeof(T) >= sizeof(U)) constexpr explicit operator U() const
{
return static_cast<U>(m_low);
}