diff options
| author | akhropov <[email protected]> | 2025-06-17 02:56:01 +0300 |
|---|---|---|
| committer | akhropov <[email protected]> | 2025-06-17 03:11:42 +0300 |
| commit | 1496d6ee1dfd8d449a3f9de4703f86dd5a1243f5 (patch) | |
| tree | 52f3ea232908bff9895c40c3238bcef4ee26cda9 /util | |
| parent | bf74ddbe253520bb319de416e11f72852a220d13 (diff) | |
Check that bytes consist of 8 bits
commit_hash:9eaf085276f1f93768b8b0e5ec92a53bf0db86a8
Diffstat (limited to 'util')
| -rw-r--r-- | util/system/types.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/util/system/types.cpp b/util/system/types.cpp index 11cc72aee37..b16d22140d9 100644 --- a/util/system/types.cpp +++ b/util/system/types.cpp @@ -3,6 +3,10 @@ #include <util/generic/typetraits.h> #include <util/generic/typelist.h> +#include <limits.h> + +static_assert(CHAR_BIT == 8, "Non 8-bit bytes are not supported"); + static_assert(sizeof(ui8) == 1, "incorrect ui8 type"); static_assert(sizeof(ui16) == 2, "incorrect ui16 type"); static_assert(sizeof(ui32) == 4, "incorrect ui32 type"); |
