diff --git a/include/fast_float/parse_number.h b/include/fast_float/parse_number.h index 3284443..5f5c264 100644 --- a/include/fast_float/parse_number.h +++ b/include/fast_float/parse_number.h @@ -29,6 +29,11 @@ from_chars_result parse_infnan(const char *first, const char *last, T &value) n minusSign = true; ++first; } +#if FASTFLOAT_ALLOWS_LEADING_PLUS // disabled by default + if (*first == '+') { + ++first; + } +#endif if (last - first >= 3) { if (fastfloat_strncasecmp(first, "nan", 3)) { answer.ptr = (first += 3);