aboutsummaryrefslogtreecommitdiffstats
path: root/util/system/platform.cpp
diff options
context:
space:
mode:
authorDevtools Arcadia <arcadia-devtools@yandex-team.ru>2022-02-07 18:08:42 +0300
committerDevtools Arcadia <arcadia-devtools@mous.vla.yp-c.yandex.net>2022-02-07 18:08:42 +0300
commit1110808a9d39d4b808aef724c861a2e1a38d2a69 (patch)
treee26c9fed0de5d9873cce7e00bc214573dc2195b7 /util/system/platform.cpp
downloadydb-1110808a9d39d4b808aef724c861a2e1a38d2a69.tar.gz
intermediate changes
ref:cde9a383711a11544ce7e107a78147fb96cc4029
Diffstat (limited to 'util/system/platform.cpp')
-rw-r--r--util/system/platform.cpp18
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");