Boost logo

Boost :

From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2024-01-17 12:13:53


On 1/17/24 14:57, Matt Borland via Boost wrote:
>
>> But isn't strtold locale dependent while from_chars is supposed to act
>> as-if strtod in the "C"-locale? Wouldn't that fallback violate that
>> contract on non-English locales?
>>
>
>> Or does that fallback only apply when the locale difference does not matter?
>>
>
>> Alex
>>
>
>
> The latter since we will have already attempted conversion internally, and rejected a string that is not in the "C"-locale.

Is strtod operating in non-C locale required to correctly parse a number
that was formatted using C locale? For example, what if it expects a
fractional digits separator other than dot?


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk