/
githubmirror
/
nbs
Обзор
Документация
Войти
/
githubmirror
/
nbs
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
util/generic/flags.cpp
29 строк
807 B
ilnurkh
Y_VERIFY->Y_ABORT_UNLESS at ^u
10 окт 2023, 12:04
10 окт 2023, 12:04
961e181
Код
Авторство
О чём код?
#include "flags.h" #include <util/stream/format.h> #include <util/system/yassert.h> void ::NPrivate::PrintFlags(IOutputStream& stream, ui64 value, size_t size) { /* Note that this function is in cpp because we need to break circular * dependency between TFlags and ENumberFormat. */ stream << "TFlags("; switch (size) { case 1: stream << Bin(static_cast<ui8>(value), HF_FULL); break; case 2: stream << Bin(static_cast<ui16>(value), HF_FULL); break; case 4: stream << Bin(static_cast<ui32>(value), HF_FULL); break; case 8: stream << Bin(static_cast<ui64>(value), HF_FULL); break; default: Y_ABORT_UNLESS(false); } stream << ")"; }