platform.cpp 1.0 KB

123456789101112131415161718
  1. #include "platform.h"
  2. #include <cstddef>
  3. static_assert(sizeof(char) == SIZEOF_CHAR, "incorrect SIZEOF_CHAR");
  4. static_assert(sizeof(short) == SIZEOF_SHORT, "incorrect SIZEOF_SHORT");
  5. static_assert(sizeof(int) == SIZEOF_INT, "incorrect SIZEOF_INT");
  6. static_assert(sizeof(long) == SIZEOF_LONG, "incorrect SIZEOF_LONG");
  7. static_assert(sizeof(long long) == SIZEOF_LONG_LONG, "incorrect SIZEOF_LONG_LONG");
  8. static_assert(sizeof(unsigned char) == SIZEOF_UNSIGNED_CHAR, "incorrect SIZEOF_UNSIGNED_CHAR");
  9. static_assert(sizeof(unsigned short) == SIZEOF_UNSIGNED_SHORT, "incorrect SIZEOF_UNSIGNED_SHORT");
  10. static_assert(sizeof(unsigned int) == SIZEOF_UNSIGNED_INT, "incorrect SIZEOF_UNSIGNED_INT");
  11. static_assert(sizeof(unsigned long) == SIZEOF_UNSIGNED_LONG, "incorrect SIZEOF_UNSIGNED_LONG");
  12. static_assert(sizeof(unsigned long long) == SIZEOF_UNSIGNED_LONG_LONG, "incorrect SIZEOF_UNSIGNED_LONG_LONG");
  13. static_assert(sizeof(void*) == SIZEOF_PTR, "incorrect SIZEOF_PTR");
  14. static_assert(sizeof(void*) == sizeof(size_t), "unsupported platform");