Return true if Value is a non-zero power of two.
Declared in <llvm/ADT/bit.h>
template<typename T>
requires std::is_unsigned_v<T>
[[nodiscard]]
constexpr
bool
has_single_bit(T Value) noexcept;
True if Value is a non-zero power of two.
The return value should not be discarded.
| Name | Description |
|---|---|
| Value | Unsigned value to test. |