From c5214a9500d9f9dfce0fcd0b7649ff4e07f9b9f2 Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Wed, 17 May 2023 09:08:15 +0200 Subject: [PATCH] Make a note in the docs that we diverge from the standard on ERANGE --- doc/charconv/from_chars.adoc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/charconv/from_chars.adoc b/doc/charconv/from_chars.adoc index 6188dee..bfd279a 100644 --- a/doc/charconv/from_chars.adoc +++ b/doc/charconv/from_chars.adoc @@ -49,6 +49,10 @@ from_chars_result from_chars(const char* first, const char* last, Real& value, c * from_chars for integral types is constexpr when compiled using `-std=c++14` or newer ** One known exception is GCC 5 which does not support constexpr comparison of `const char*`. +=== from_chars for floating point types +* On ERANGE we return ±0 for small values (e.g. 1.0e-99999) or ±HUGE_VAL for large values (1.0e+99999) to match the handling of `std::strtod`. +This is a divergence from the standard. + == Examples === Basic usage