BloombergLP::bdlb::BitUtil::roundUpToBinaryPower

Return the least power of 2 that is greater than or equal to the specified value, and 0 if the conversion was not successful. Note that the conversion will succeed if and only if 0 < value <= (1 << (sizeInBits(value) - 1))

Synopsis

Declared in <bdlb_bitutil.h>

static
unsigned int
roundUpToBinaryPower(unsigned int value);