diff --git a/include/fast_float/ascii_number.h b/include/fast_float/ascii_number.h index 83f9e1d..5ca52f5 100644 --- a/include/fast_float/ascii_number.h +++ b/include/fast_float/ascii_number.h @@ -208,8 +208,7 @@ template template ()) = 0> #endif // dummy for compile -FASTFLOAT_CONSTEVAL20 bool simd_parse_if_eight_digits_unrolled(UC const *, - uint64_t &) { +bool simd_parse_if_eight_digits_unrolled(UC const *, uint64_t &) { return 0; } @@ -304,9 +303,8 @@ parse_number_string(UC const *p, UC const *pend, #ifndef FASTFLOAT_ONLY_POSITIVE_C_NUMBER_WO_INF_NAN answer.negative = (*p == UC('-')); // C++17 20.19.3.(7.1) explicitly forbids '+' sign here - if (*p == UC('-') || - (uint64_t(options.format & chars_format::allow_leading_plus) && - *p == UC('+'))) { + if ((*p == UC('-')) || (uint64_t(options.format & chars_format::allow_leading_plus) && + !basic_json_fmt && *p == UC('+'))) { ++p; if (p == pend) { return report_parse_error( @@ -320,8 +318,8 @@ parse_number_string(UC const *p, UC const *pend, } else { if (!is_integer(*p) && - (*p != options.decimal_point)) { // a sign must be followed by an - // integer or the dot + (*p != + options.decimal_point)) { // a sign must be followed by an integer or the dot return report_parse_error( p, parse_error::missing_integer_or_dot_after_sign); } diff --git a/include/fast_float/constexpr_feature_detect.h b/include/fast_float/constexpr_feature_detect.h index 0a98254..0b5ca2d 100644 --- a/include/fast_float/constexpr_feature_detect.h +++ b/include/fast_float/constexpr_feature_detect.h @@ -44,11 +44,9 @@ defined(__cpp_lib_constexpr_algorithms) && \ __cpp_lib_constexpr_algorithms >= 201806L /*For std::copy and std::fill*/ #define FASTFLOAT_CONSTEXPR20 constexpr -#define FASTFLOAT_CONSTEVAL20 consteval #define FASTFLOAT_IS_CONSTEXPR 1 #else #define FASTFLOAT_CONSTEXPR20 -#define FASTFLOAT_CONSTEVAL20 FASTFLOAT_CONSTEXPR14 #define FASTFLOAT_IS_CONSTEXPR 0 #endif