cppx-core
Namespaces | Functions
intlog2.hpp File Reference

intlog2, the position of the most significant bit in an unsigned value. More...

#include <cppx-core/language/syntax/macro-use.hpp>
#include <c/limits.hpp>
#include <c/stdint.hpp>
#include <type_traits>
Include dependency graph for intlog2.hpp:

Go to the source code of this file.

Namespaces

 cppx
 
 cppx::bitlevel
 

Functions

template<class Unsigned >
constexpr auto cppx::intlog2 (const Unsigned x) noexcept -> int
 The position of the most significant bit in an unsigned value, or -1 for value zero. More...
 
 cppx::bitlevel::CPPX_USE_CPPX (intlog2)
 

Detailed Description

intlog2, the position of the most significant bit in an unsigned value.

Definition in file intlog2.hpp.