MSVC compilation fix.

This commit is contained in:
IRainman 2025-12-25 19:16:26 +03:00
parent e88d9ae427
commit 325c7236e7

View File

@ -21,6 +21,16 @@
#endif // #ifndef FASTFLOAT_CONSTEXPR_TESTS
#endif // FASTFLOAT_IS_CONSTEXPR
// MSVC's constexpr evaluation and some constexpr-friendly std library pieces
// (like i/o and certain std::numeric_limits members) aren't suitable for the
// compile-time tests in this file on MSVC; disable the constexpr tests when
// compiling with MSVC (but allow them for clang/clang-cl).
#if defined(_MSC_VER) && !defined(__clang__)
# ifdef FASTFLOAT_CONSTEXPR_TESTS
# undef FASTFLOAT_CONSTEXPR_TESTS
# endif
#endif
#if FASTFLOAT_HAS_BIT_CAST
#include <bit>
#endif