Skip to content

Commit ed87109

Browse files
committed
Remove FASTFLOAT_CONSTEVAL20 that I was added before and cleanup diff.
1 parent fc9f61e commit ed87109

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

include/fast_float/ascii_number.h

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,7 @@ template <typename UC>
208208
template <typename UC, FASTFLOAT_ENABLE_IF(!has_simd_opt<UC>()) = 0>
209209
#endif
210210
// dummy for compile
211-
FASTFLOAT_CONSTEVAL20 bool simd_parse_if_eight_digits_unrolled(UC const *,
212-
uint64_t &) {
211+
bool simd_parse_if_eight_digits_unrolled(UC const *, uint64_t &) {
213212
return 0;
214213
}
215214

@@ -304,9 +303,8 @@ parse_number_string(UC const *p, UC const *pend,
304303
#ifndef FASTFLOAT_ONLY_POSITIVE_C_NUMBER_WO_INF_NAN
305304
answer.negative = (*p == UC('-'));
306305
// C++17 20.19.3.(7.1) explicitly forbids '+' sign here
307-
if (*p == UC('-') ||
308-
(uint64_t(options.format & chars_format::allow_leading_plus) &&
309-
*p == UC('+'))) {
306+
if ((*p == UC('-')) || (uint64_t(options.format & chars_format::allow_leading_plus) &&
307+
!basic_json_fmt && *p == UC('+'))) {
310308
++p;
311309
if (p == pend) {
312310
return report_parse_error<UC>(
@@ -320,8 +318,8 @@ parse_number_string(UC const *p, UC const *pend,
320318
}
321319
else {
322320
if (!is_integer(*p) &&
323-
(*p != options.decimal_point)) { // a sign must be followed by an
324-
// integer or the dot
321+
(*p !=
322+
options.decimal_point)) { // a sign must be followed by an integer or the dot
325323
return report_parse_error<UC>(
326324
p, parse_error::missing_integer_or_dot_after_sign);
327325
}

include/fast_float/constexpr_feature_detect.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,9 @@
4444
defined(__cpp_lib_constexpr_algorithms) && \
4545
__cpp_lib_constexpr_algorithms >= 201806L /*For std::copy and std::fill*/
4646
#define FASTFLOAT_CONSTEXPR20 constexpr
47-
#define FASTFLOAT_CONSTEVAL20 consteval
4847
#define FASTFLOAT_IS_CONSTEXPR 1
4948
#else
5049
#define FASTFLOAT_CONSTEXPR20
51-
#define FASTFLOAT_CONSTEVAL20 FASTFLOAT_CONSTEXPR14
5250
#define FASTFLOAT_IS_CONSTEXPR 0
5351
#endif
5452

0 commit comments

Comments
 (0)