AK: Remove unused Checked<T> code

We could never hit the #else branches for some of these methods, because
we already relied on having __builtin_*_overflow() readily available in
earlier methods.

multiplication_would_overflow() with three arguments was only used in a
test, so let's get rid of that as well.
This commit is contained in:
Jelle Raaijmakers 2025-10-21 21:44:50 +02:00 committed by Jelle Raaijmakers
parent f49cf75d44
commit 2c78fd5b89
Notes: github-actions[bot] 2025-10-21 23:10:59 +00:00
2 changed files with 3 additions and 29 deletions

View file

@ -374,7 +374,6 @@ TEST_CASE(should_constexpr_check_for_overflow_addition)
TEST_CASE(should_constexpr_check_for_overflow_multiplication)
{
static_assert(Checked<int>::multiplication_would_overflow(NumericLimits<int>::max(), 2));
static_assert(Checked<int>::multiplication_would_overflow(NumericLimits<int>::max(), 1, 2));
}
TEST_CASE(should_constexpr_add_checked_values)