#pragma once #include #include #include template static inline constexpr int log_min_pow_of_two(Int n) { using UInt = std::make_unsigned_t; return std::numeric_limits::digits - std::countl_zero(static_cast(n)); } template static inline constexpr Int min_pow_of_two(Int n) { return std::make_unsigned_t(1) << log_min_pow_of_two(n); }