4#ifndef TETL_BIT_COUNTL_ZERO_HPP
5#define TETL_BIT_COUNTL_ZERO_HPP
7#include <etl/_concepts/builtin_unsigned_integer.hpp>
8#include <etl/_limits/numeric_limits.hpp>
23template <
etl::builtin_unsigned_integer UInt>
24[[nodiscard]]
constexpr auto countl_zero(UInt x)
noexcept ->
int
32 while (
not(x & (UInt(1) << (
static_cast<UInt>(totalBits) - UInt(1))))) {
33 x =
static_cast<UInt>(x << UInt(1));
constexpr auto countl_zero(UInt x) noexcept -> int
Returns the number of consecutive 0 bits in the value of x, starting from the most significant bit ("...
Definition countl_zero.hpp:24
Definition adjacent_find.hpp:9
Definition numeric_limits.hpp:18