File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 12
12
#if defined(__cpp_lib_bit_cast)
13
13
#undef CXX20_CONSTEXPR
14
14
#define CXX20_CONSTEXPR constexpr
15
+ #define HAS_CXX20_CONSTEXPR 1
15
16
#endif
16
17
#endif
17
18
#endif
Original file line number Diff line number Diff line change 81
81
#if defined(__cpp_lib_bit_cast)
82
82
#undef CXX20_CONSTEXPR
83
83
#define CXX20_CONSTEXPR constexpr
84
+ #define HAS_CXX20_CONSTEXPR 1
84
85
#endif
85
86
#endif
86
87
#endif
Original file line number Diff line number Diff line change 5
5
#include " fast_float/fast_float.h"
6
6
#include < iomanip>
7
7
#include < string>
8
- #include < version>
9
8
10
9
#ifndef SUPPLEMENTAL_TEST_DATA_DIR
11
10
#define SUPPLEMENTAL_TEST_DATA_DIR " data/"
38
37
#define FASTFLOAT_ODDPLATFORM 1
39
38
#endif
40
39
41
- #if defined(__cpp_lib_bit_cast)
40
+ #if HAS_CXX20_CONSTEXPR
42
41
#include < bit>
43
42
#include < string_view>
44
43
#endif
@@ -116,7 +115,7 @@ TEST_CASE("supplemental") {
116
115
}
117
116
#endif
118
117
119
- #if defined(__cpp_lib_bit_cast)
118
+ #if HAS_CXX20_CONSTEXPR
120
119
121
120
constexpr double tryParse (std::string_view input)
122
121
{
@@ -136,7 +135,7 @@ static_assert(tryParse("3.14156") != 3.1415600000001);
136
135
static_assert (std::isnan(tryParse(" hellothere" ))); // technically isnan is not constexpr but GCC and clang allow it
137
136
#endif
138
137
139
- #endif // #if defined(__cpp_lib_bit_cast)
138
+ #endif // #if HAS_CXX20_CONSTEXPR
140
139
141
140
TEST_CASE (" leading_zeroes" ) {
142
141
constexpr const uint64_t bit = 1 ;
You can’t perform that action at this time.
0 commit comments