Returns the next power of two (in 64‐bits) that is strictly greater than A. Returns zero on overflow.

Synopsis

Declared in <llvm/Support/MathExtras.h>

constexpr
uint64_t
NextPowerOf2(uint64_t A);

Return Value

The next power of two strictly greater than A, or zero on overflow.

Parameters

Name

Description

A

Value whose next power of two is returned.

Created with MrDocs