Template Function iox::cxx::isPowerOfTwo

Function Documentation

template<typename T>
constexpr bool iox::cxx::isPowerOfTwo(const T n) noexcept

Checks if an unsigned integer is a power of two.

Returns:

true if power of two, otherwise false