Created on 2018-03-12.00:00:00 last changed 45 months ago
Proposed resolution:
This wording is relative to N4727.
Edit [charconv.from.chars] as indicated:
from_chars_result from_chars(const char* first, const char* last, float& value, chars_format fmt = chars_format::general); from_chars_result from_chars(const char* first, const char* last, double& value, chars_format fmt = chars_format::general); from_chars_result from_chars(const char* first, const char* last, long double& value, chars_format fmt = chars_format::general);-6- Requires: fmt has the value of one of the enumerators of chars_format.
-7- Effects: The pattern is the expected form of the subject sequence in the "C" locale, as described for strtod, except that
(7.1) — the
onlysign '+'thatmay only appearis '-'in the exponent part;(7.2) […]
(7.3) […]
(7.4) […]
[ 2018-06 Rapperswil: Adopted ]
[ 2018-03-27 Moved to Tentatively Ready after 9 positive votes on c++std-lib. ]
from_chars specifies that the '+' character is never matched, but to_chars specifies its output format in terms of printf(), which puts a '+' sign before positive exponents.
Since strtod() matches '+' signs, it is also desirable to accept '+' in exponents, so that code currently using strtod() can be migrated to from_chars() without a breaking semantic change.History | |||
---|---|---|---|
Date | User | Action | Args |
2021-02-25 10:48:01 | admin | set | status: wp -> c++20 |
2018-06-12 01:05:16 | admin | set | messages: + msg9888 |
2018-06-12 01:05:16 | admin | set | status: voting -> wp |
2018-05-06 19:23:13 | admin | set | status: ready -> voting |
2018-03-31 11:58:32 | admin | set | messages: + msg9791 |
2018-03-31 11:58:32 | admin | set | status: new -> ready |
2018-03-24 20:49:28 | admin | set | messages: + msg9769 |
2018-03-12 00:00:00 | admin | create |