10 May
2023
10 May
'23
11:08 p.m.
On 11/05/2023 02:01, Matt Borland wrote:
What does charconv do? It converts a character sequence into a number (from_chars) or converts a number into a character sequence (to_chars). This is similar to strtod and printf with a few key differences. First and most important is a roundtrip guarantee. That is a number converted into a character sequence, and then back into a number will be identical to the starting value. Second, you can easily specify an input/output format with a chars_format argument, and also provide a target precision.
"Roundtrip guarantee" and "specify format/precision" appear to be contradictory goals.