Luna::is_pow_of_two

template <typename _Ty>
constexpr bool is_pow_of_two(_Ty n)

Check whether the provided number is power of two.

Parameters

  • _Ty

    The value type.

Parameters

  • in n

    The value to check.

Return value

Returns ture if the value is power of two. Returns false otherwise.