diff --git a/include/fast_float/ascii_number.h b/include/fast_float/ascii_number.h index fbcc5f9..39c8d67 100644 --- a/include/fast_float/ascii_number.h +++ b/include/fast_float/ascii_number.h @@ -7,11 +7,13 @@ #include #include -#if defined(__has_include) && __has_include() -#include -#if defined(__cpp_lib_bit_cast) -#include -#endif +#if defined __has_include + #if __has_include() + #include + #if defined(__cpp_lib_bit_cast) + #include + #endif + #endif #endif #include "float_common.h" diff --git a/include/fast_float/fast_float.h b/include/fast_float/fast_float.h index ac18297..1efe917 100644 --- a/include/fast_float/fast_float.h +++ b/include/fast_float/fast_float.h @@ -4,13 +4,17 @@ #include -#if !defined(CXX20_CONSTEXPR) && defined(__has_include) && __has_include() -#include -#if defined(__cpp_lib_bit_cast) -#define CXX20_CONSTEXPR constexpr -#else -#define CXX20_CONSTEXPR -#endif +#if !defined(CXX20_CONSTEXPR) + #define CXX20_CONSTEXPR + #if defined __has_include + #if __has_include() + #include + #if defined(__cpp_lib_bit_cast) + #undef CXX20_CONSTEXPR + #define CXX20_CONSTEXPR constexpr + #endif + #endif + #endif #endif namespace fast_float { diff --git a/include/fast_float/float_common.h b/include/fast_float/float_common.h index 1e10bf8..9ce20a8 100644 --- a/include/fast_float/float_common.h +++ b/include/fast_float/float_common.h @@ -73,13 +73,17 @@ #define fastfloat_really_inline inline __attribute__((always_inline)) #endif -#if !defined(CXX20_CONSTEXPR) && defined(__has_include) && __has_include() -#include -#if defined(__cpp_lib_bit_cast) -#define CXX20_CONSTEXPR constexpr -#else -#define CXX20_CONSTEXPR -#endif +#if !defined(CXX20_CONSTEXPR) + #define CXX20_CONSTEXPR + #if defined __has_include + #if __has_include() + #include + #if defined(__cpp_lib_bit_cast) + #undef CXX20_CONSTEXPR + #define CXX20_CONSTEXPR constexpr + #endif + #endif + #endif #endif namespace fast_float {