diff options
author | Devtools Arcadia <arcadia-devtools@yandex-team.ru> | 2022-02-07 18:08:42 +0300 |
---|---|---|
committer | Devtools Arcadia <arcadia-devtools@mous.vla.yp-c.yandex.net> | 2022-02-07 18:08:42 +0300 |
commit | 1110808a9d39d4b808aef724c861a2e1a38d2a69 (patch) | |
tree | e26c9fed0de5d9873cce7e00bc214573dc2195b7 /util/system/platform.cpp | |
download | ydb-1110808a9d39d4b808aef724c861a2e1a38d2a69.tar.gz |
intermediate changes
ref:cde9a383711a11544ce7e107a78147fb96cc4029
Diffstat (limited to 'util/system/platform.cpp')
-rw-r--r-- | util/system/platform.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/util/system/platform.cpp b/util/system/platform.cpp new file mode 100644 index 0000000000..9421235bb4 --- /dev/null +++ b/util/system/platform.cpp @@ -0,0 +1,18 @@ +#include "platform.h" + +#include <cstddef> + +static_assert(sizeof(char) == SIZEOF_CHAR, "incorrect SIZEOF_CHAR"); +static_assert(sizeof(short) == SIZEOF_SHORT, "incorrect SIZEOF_SHORT"); +static_assert(sizeof(int) == SIZEOF_INT, "incorrect SIZEOF_INT"); +static_assert(sizeof(long) == SIZEOF_LONG, "incorrect SIZEOF_LONG"); +static_assert(sizeof(long long) == SIZEOF_LONG_LONG, "incorrect SIZEOF_LONG_LONG"); + +static_assert(sizeof(unsigned char) == SIZEOF_UNSIGNED_CHAR, "incorrect SIZEOF_UNSIGNED_CHAR"); +static_assert(sizeof(unsigned short) == SIZEOF_UNSIGNED_SHORT, "incorrect SIZEOF_UNSIGNED_SHORT"); +static_assert(sizeof(unsigned int) == SIZEOF_UNSIGNED_INT, "incorrect SIZEOF_UNSIGNED_INT"); +static_assert(sizeof(unsigned long) == SIZEOF_UNSIGNED_LONG, "incorrect SIZEOF_UNSIGNED_LONG"); +static_assert(sizeof(unsigned long long) == SIZEOF_UNSIGNED_LONG_LONG, "incorrect SIZEOF_UNSIGNED_LONG_LONG"); + +static_assert(sizeof(void*) == SIZEOF_PTR, "incorrect SIZEOF_PTR"); +static_assert(sizeof(void*) == sizeof(size_t), "unsupported platform"); |