diff --git a/AK/StdLibExtras.h b/AK/StdLibExtras.h index 57e3f5f295a..7a48da2ba1d 100644 --- a/AK/StdLibExtras.h +++ b/AK/StdLibExtras.h @@ -10,7 +10,8 @@ #include -constexpr unsigned round_up_to_power_of_two(unsigned value, unsigned power_of_two) +template +constexpr auto round_up_to_power_of_two(T value, U power_of_two) requires(IsIntegral&& IsIntegral) { return ((value - 1) & ~(power_of_two - 1)) + power_of_two; }