Add static_assert size checks to types.hpp

This commit is contained in:
Gary Talent 2018-02-13 19:44:14 -06:00
parent d3b8e6089b
commit 7e31eda638

View File

@ -27,6 +27,15 @@ typedef int64_t intmax_t;
typedef uint64_t uintmax_t;
#endif
static_assert(sizeof(int8_t) == 1, "int8_t is wrong size");
static_assert(sizeof(int16_t) == 2, "int16_t is wrong size");
static_assert(sizeof(int32_t) == 4, "int32_t is wrong size");
static_assert(sizeof(int64_t) == 8, "int64_t is wrong size");
static_assert(sizeof(uint8_t) == 1, "uint8_t is wrong size");
static_assert(sizeof(uint16_t) == 2, "uint16_t is wrong size");
static_assert(sizeof(uint32_t) == 4, "uint32_t is wrong size");
static_assert(sizeof(uint64_t) == 8, "uint64_t is wrong size");
namespace ox {