Re: [boost] charconv for C++11
On May 12, 2023, at 8:59 AM, Alexander Grund via Boost
wrote: Am 12.05.23 um 02:52 schrieb Gavin Lambert via Boost:
Mere moments ago, quoth I:
Hex format will be of the form +1.0e2p+5. The integer part will always be 0 or 1. The exponent will be with a p instead of an e like in base 10 formats. (Also, FWIW, gcc fails to parse that with the leading +. And I couldn't even find any online calculators that understand this format.) According to cppreference the floating point parser should not support it:
"the plus sign is not recognized outside of the exponent (only the minus sign is permitted at the beginning)"
So I'd say that is a bug in Boost charconv given that it wants to be as-if the standard one.
You two are correct that a value with a leading plus sign should be EINVAL rather than ignoring it during parsing. I opened an issue, and will address it. Matt
participants (1)
-
Matt Borland