Add static_assert size checks to types.hpp
This commit is contained in:
parent
d3b8e6089b
commit
7e31eda638
9
deps/ox/src/ox/std/types.hpp
vendored
9
deps/ox/src/ox/std/types.hpp
vendored
@ -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 {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user