/
githubmirror
/
nbs
Обзор
Документация
Войти
/
githubmirror
/
nbs
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
library/cpp/int128/int128_util.h
15 строк
428 B
qkrorlqr
Initial NBS OpenSource export
28 апр 2023, 21:54
28 апр 2023, 21:54
783a858
Код
Авторство
О чём код?
#pragma once #include <util/generic/bitops.h> #include <limits> namespace NPrivateInt128 { // will be moved to util/ later template <typename T> constexpr unsigned CountLeadingZeroBits(const T value) { if (value == 0) { return std::numeric_limits<std::make_unsigned_t<T>>::digits; } return std::numeric_limits<std::make_unsigned_t<T>>::digits - GetValueBitCount(value); } }