| Defined in header |
template< class T > constexpr T log2p1(T x) noexcept;
x is not zero, calculates the number of bits needed to store the value
x, that is, \(1 + \lfloor log_2(x) \rfloor\)1 + floor(log
x is zero, returns zero.
This overload only participates in overload resolution if
T is an unsigned integer type (that is,
unsigned long long, or an extended unsigned integer type).
x is zero; otherwise, one plus the base-2 logarithm of
x, with any fractional part discarded.
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.