Template Function IntegerOps::log2max

Template Function IntegerOps::log2max#

Function Documentation#

template<typename T>
inline T IntegerOps::log2max(T value)#

Returns the base-2 logorithm of value.

If value is not a power of two then the return value is rounded up to the next integer. The value is treated as an unsigned value. Returns zero if value is zero.