diff --git a/nac3core/irrt/irrt/int_types.hpp b/nac3core/irrt/irrt/int_types.hpp index 879009617..656a060e5 100644 --- a/nac3core/irrt/irrt/int_types.hpp +++ b/nac3core/irrt/irrt/int_types.hpp @@ -1,13 +1,22 @@ #pragma once +#if __STDC_VERSION__ >= 202000 using int8_t = _BitInt(8); using uint8_t = unsigned _BitInt(8); using int32_t = _BitInt(32); using uint32_t = unsigned _BitInt(32); using int64_t = _BitInt(64); using uint64_t = unsigned _BitInt(64); +#else +using int8_t = _ExtInt(8); +using uint8_t = unsigned _ExtInt(8); +using int32_t = _ExtInt(32); +using uint32_t = unsigned _ExtInt(32); +using int64_t = _ExtInt(64); +using uint64_t = unsigned _ExtInt(64); +#endif // NDArray indices are always `uint32_t`. using NDIndex = uint32_t; // The type of an index or a value describing the length of a range/slice is always `int32_t`. -using SliceIndex = int32_t; \ No newline at end of file +using SliceIndex = int32_t;