From 3e9dc96eb4ee044b51b3efe66af1ef48213f64e5 Mon Sep 17 00:00:00 2001 From: Joao Paulo Magalhaes Date: Thu, 13 Feb 2025 08:38:16 +0000 Subject: [PATCH] Fix -Wundef warnings seen in gcc 4.8 and 4.9 --- include/fast_float/constexpr_feature_detect.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/fast_float/constexpr_feature_detect.h b/include/fast_float/constexpr_feature_detect.h index 7624beaf..648b55d4 100644 --- a/include/fast_float/constexpr_feature_detect.h +++ b/include/fast_float/constexpr_feature_detect.h @@ -8,7 +8,7 @@ #endif // Testing for https://wg21.link/N3652, adopted in C++14 -#if __cpp_constexpr >= 201304 +#if defined(__cpp_constexpr) && __cpp_constexpr >= 201304 #define FASTFLOAT_CONSTEXPR14 constexpr #else #define FASTFLOAT_CONSTEXPR14 @@ -29,6 +29,7 @@ // Testing for relevant C++20 constexpr library features #if FASTFLOAT_HAS_IS_CONSTANT_EVALUATED && FASTFLOAT_HAS_BIT_CAST && \ + defined(__cpp_lib_constexpr_algorithms) && \ __cpp_lib_constexpr_algorithms >= 201806L /*For std::copy and std::fill*/ #define FASTFLOAT_CONSTEXPR20 constexpr #define FASTFLOAT_IS_CONSTEXPR 1