Skip to content

Commit d28a332

Browse files
authored
Merge pull request #303 from biojppm/fix_wundef
Fix -Wundef warnings seen in gcc 4.8
2 parents 96067ad + 3e9dc96 commit d28a332

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

include/fast_float/constexpr_feature_detect.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#endif
99

1010
// Testing for https://wg21.link/N3652, adopted in C++14
11-
#if __cpp_constexpr >= 201304
11+
#if defined(__cpp_constexpr) && __cpp_constexpr >= 201304
1212
#define FASTFLOAT_CONSTEXPR14 constexpr
1313
#else
1414
#define FASTFLOAT_CONSTEXPR14
@@ -29,6 +29,7 @@
2929

3030
// Testing for relevant C++20 constexpr library features
3131
#if FASTFLOAT_HAS_IS_CONSTANT_EVALUATED && FASTFLOAT_HAS_BIT_CAST && \
32+
defined(__cpp_lib_constexpr_algorithms) && \
3233
__cpp_lib_constexpr_algorithms >= 201806L /*For std::copy and std::fill*/
3334
#define FASTFLOAT_CONSTEXPR20 constexpr
3435
#define FASTFLOAT_IS_CONSTEXPR 1

0 commit comments

Comments
 (0)