diff --git a/src/ox/std/types.hpp b/src/ox/std/types.hpp index dafc54bf5..2a2e3f1e8 100644 --- a/src/ox/std/types.hpp +++ b/src/ox/std/types.hpp @@ -48,6 +48,65 @@ typedef uint32_t uintptr_t; #endif +namespace ox { + +template +struct SignedType { +}; + +template<> +struct SignedType<8> { + using type = int8_t; +}; + +template<> +struct SignedType<16> { + using type = int16_t; +}; + +template<> +struct SignedType<32> { + using type = int32_t; +}; + +template<> +struct SignedType<64> { + using type = int64_t; +}; + + +template +struct UnsignedType { +}; + +template<> +struct UnsignedType<8> { + using type = uint8_t; +}; + +template<> +struct UnsignedType<16> { + using type = uint16_t; +}; + +template<> +struct UnsignedType<32> { + using type = uint32_t; +}; + +template<> +struct UnsignedType<64> { + using type = uint64_t; +}; + +template +using Int = typename SignedType::type; + +template +using Uint = typename UnsignedType::type; + +} + namespace std {