Home / list of functions / fwnbi::clz
template <size_t B, class D>
constexpr size_t clz(const basic_integer<B, D, false>& value) noexcept;
constexpr since C++14

Calculates count 0-bits from MSB before 1-bit in integer.

Example
#include "fwnbi.hpp"
#include <iostream>

using namespace fwnbi::literals;

int main() {
    std::cout << fwnbi::clz(15241578750190521_ull128) << '\n';
}
Output
74