diff --git a/src/include/OpenImageIO/typedesc.h b/src/include/OpenImageIO/typedesc.h index 9263a209eb..b6ac37cef0 100644 --- a/src/include/OpenImageIO/typedesc.h +++ b/src/include/OpenImageIO/typedesc.h @@ -401,9 +401,11 @@ template<> struct BaseTypeFromC { static const TypeDesc::BASETYPE valu template<> struct BaseTypeFromC { static const TypeDesc::BASETYPE value = TypeDesc::INT; }; template<> struct BaseTypeFromC { static const TypeDesc::BASETYPE value = TypeDesc::UINT64; }; template<> struct BaseTypeFromC { static const TypeDesc::BASETYPE value = TypeDesc::INT64; }; -#if defined(__GNUC__) && !defined(__apple_build_version__) && __WORDSIZE == 64 -// gcc on some platforms consider int64_t and long long to be different -// types, even though they are actually the same size. +#if defined(__GNUC__) && __WORDSIZE == 64 && !(defined(__APPLE__) && defined(__MACH__)) +// Some platforms consider int64_t and long long to be different types, even +// though they are actually the same size. +static_assert(!std::is_same_v); +static_assert(!std::is_same_v); template<> struct BaseTypeFromC { static const TypeDesc::BASETYPE value = TypeDesc::UINT64; }; template<> struct BaseTypeFromC { static const TypeDesc::BASETYPE value = TypeDesc::INT64; }; #endif