carb::cpp::bit_floor
Defined in carb/cpp/Bit.h
-
template<class T, std::enable_if_t<detail::IsUnsignedIntegral<T>::value, bool> = false>
constexpr T carb::cpp::bit_floor(T val) noexcept Finds the largest integral power of two not greater than the given value.
- Template Parameters
T – An unsigned integral type
- Parameters
val – An unsigned integral value
- Returns
The largest integral power of two not greater than
val
.