Returns the number of bits needed to represent Value if Value is nonzero. Returns 0 otherwise.
Declared in <llvm/ADT/bit.h>
template<typename T>
[[nodiscard]]
constexpr
int
bit_width_constexpr(T Value);
A constexpr version of bit_width.
Ex. bit_width_constexpr(5) == 3.
Bit width of Value, or 0 if Value is zero.
The return value should not be discarded.
| Name | Description |
|---|---|
| Value | Unsigned value whose bit width is computed. |