mirror of
https://github.com/fastfloat/fast_float.git
synced 2025-12-07 01:06:48 +08:00
additional FASTFLOAT_HAS_BIT_CAST improve for older standards.
This commit is contained in:
parent
a550415314
commit
978441a5bb
@ -1045,7 +1045,11 @@ fastfloat_really_inline FASTFLOAT_CONSTEXPR20 void to_float(
|
|||||||
equiv_uint(word | equiv_uint(negative) << binary_format<T>::sign_index());
|
equiv_uint(word | equiv_uint(negative) << binary_format<T>::sign_index());
|
||||||
#endif
|
#endif
|
||||||
#if FASTFLOAT_HAS_BIT_CAST
|
#if FASTFLOAT_HAS_BIT_CAST
|
||||||
value = std::bit_cast<T>(word);
|
value =
|
||||||
|
#if FASTFLOAT_HAS_BIT_CAST == 1
|
||||||
|
std::
|
||||||
|
#endif
|
||||||
|
bit_cast<T>(word);
|
||||||
#else
|
#else
|
||||||
::memcpy(&value, &word, sizeof(T));
|
::memcpy(&value, &word, sizeof(T));
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user