| 235 | */ |
| 236 | template <typename T> |
| 237 | static inline unsigned CountTrailingZeroBits(T value) noexcept { |
| 238 | Y_ASSERT(value > 0); |
| 239 | using TCvt = typename ::TUnsignedInts::template TSelectBy<TSizeOfPredicate<sizeof(T)>::template TResult>::type; |
| 240 | return ::NBitOps::NPrivate::CountTrailingZeroBitsImpl(static_cast<TCvt>(value)); |
| 241 | } |
| 242 | |
| 243 | /* |
| 244 | * Returns 64-bit mask with `bits` lower bits set. |