#pragma once #include #include namespace NPrivateInt128 { // will be moved to util/ later template constexpr unsigned CountLeadingZeroBits(const T value) { if (value == 0) { return std::numeric_limits>::digits; } return std::numeric_limits>::digits - GetValueBitCount(value); } }