maths: use the std::integral concept for log2up
This commit is contained in:
parent
85bd599577
commit
10ba888a4b
@ -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)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user