maths: use the std::integral concept for log2up

This commit is contained in:
Danny Robson 2022-06-20 09:31:02 +10:00
parent 85bd599577
commit 10ba888a4b

View File

@ -207,8 +207,8 @@ namespace cruft {
///------------------------------------------------------------------------ ///------------------------------------------------------------------------
/// Calculates the base-2 logarithm of an integer, rounding up to the next /// Calculates the base-2 logarithm of an integer, rounding up to the next
/// highest integer. /// highest integer.
template <typename T> template <std::integral T>
T constexpr T
log2up (T val) log2up (T val)
{ {