From 183010cbf5ed730aef4f6a674e30713d25c766d3 Mon Sep 17 00:00:00 2001 From: Jeongseok Lee Date: Fri, 21 Jun 2024 20:24:00 -0700 Subject: [PATCH] Fix build with clang 12 --- src/ofbx.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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;