diff --git a/yoga/CompactValue.h b/yoga/CompactValue.h index 510e993a..1ed0a74b 100644 --- a/yoga/CompactValue.h +++ b/yoga/CompactValue.h @@ -11,6 +11,8 @@ #ifdef __cpp_lib_bit_cast #include +#else +#include #endif #include "YGValue.h" #include "YGMacros.h" @@ -169,7 +171,7 @@ private: static float asFloat(uint32_t u) { #ifdef __cpp_lib_bit_cast - return std::bit_cast(data); + return std::bit_cast(u); #else float f; static_assert(sizeof(f) == sizeof(u), "uint32_t and float must have the same size");