#pragma once #include #include #include #include #include using Int8 = int8_t; using Int16 = int16_t; using Int32 = int32_t; using Int64 = int64_t; using UInt8 = uint8_t; using UInt16 = uint16_t; using UInt32 = uint32_t; using UInt64 = uint64_t; using String = std::string; /// The standard library type traits, such as std::is_arithmetic, with one exception /// (std::common_type), are "set in stone". Attempting to specialize them causes undefined behavior. /// So instead of using the std type_traits, we use our own version which allows extension. template struct is_signed { static constexpr bool value = std::is_signed_v; }; template inline constexpr bool is_signed_v = is_signed::value; template struct is_unsigned { static constexpr bool value = std::is_unsigned_v; }; template inline constexpr bool is_unsigned_v = is_unsigned::value; template struct is_integral { static constexpr bool value = std::is_integral_v; }; template inline constexpr bool is_integral_v = is_integral::value; template struct is_arithmetic { static constexpr bool value = std::is_arithmetic_v; }; template inline constexpr bool is_arithmetic_v = is_arithmetic::value;