types.cpp 691 B

123456789101112131415161718
  1. #include "types.h"
  2. #include <util/generic/typetraits.h>
  3. #include <util/generic/typelist.h>
  4. static_assert(sizeof(ui8) == 1, "incorrect ui8 type");
  5. static_assert(sizeof(ui16) == 2, "incorrect ui16 type");
  6. static_assert(sizeof(ui32) == 4, "incorrect ui32 type");
  7. static_assert(sizeof(ui64) == 8, "incorrect ui64 type");
  8. static_assert(sizeof(i8) == 1, "incorrect i8 type");
  9. static_assert(sizeof(i16) == 2, "incorrect i16 type");
  10. static_assert(sizeof(i32) == 4, "incorrect i32 type");
  11. static_assert(sizeof(i64) == 8, "incorrect i64 type");
  12. static_assert(sizeof(size_t) == sizeof(ssize_t), "incorrect ssize_t");
  13. static_assert(TTypeList<ui32, ui64>::THave<size_t>::value, "incorrect size_t");