+ unsigned long ret = -1; // NOLINT + _BitScanForward64(&ret, x); + return ret; +#elif defined(_WIN32) + unsigned long ret = -1; // NOLINT Why do you need this initial value? This is not required from __builtin_clz-like functions, and anyway checking for x to be nonzero is better.