diff --git a/src/ofbx.cpp b/src/ofbx.cpp index 2650609..565f4f9 100644 --- a/src/ofbx.cpp +++ b/src/ofbx.cpp @@ -12,7 +12,7 @@ #include #include -#if __cplusplus >= 202002L +#if __cplusplus >= 202002L && defined(__cpp_lib_bit_cast) #include // for std::bit_cast (C++20 and later) #endif #include @@ -1051,7 +1051,7 @@ static OptionalError tokenize(const u8* data, size_t size, u32& versio cursor.current = data; cursor.end = data + size; -#if __cplusplus >= 202002L +#if __cplusplus >= 202002L && defined(__cpp_lib_bit_cast) const Header* header = std::bit_cast(cursor.current); #else Header header_temp;