C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Low-level float parsing functions

From: Jan Schultke <janschultke_at_[hidden]>
Date: Mon, 28 Apr 2025 17:06:39 +0200
Yeah, that's pretty much it. I suppose it would be half-measure to still
include sign characters in the integer and exponent part rather than going
all the way and passing those as bool.

>
Encoding issues are also interesting. It's quite plausible that the input
is a UTF-16 or UTF-32 string, and you'd want to parse that "directly".
std::from_chars has no Unicode support at the moment, but that almost feels
like a separate issue. I feel like it would be fine to have whatever
functions come out of this still operate on character sequences with some
encoding. Alternatively, you'd pass a sequence of std::bytes, each storing
a digit or so, but that's just another encoding, so it's not any better
than operating on ASCII/UTF-8 floating-point numbers.

Received on 2025-04-28 15:06:53