This is the mail archive of the
mailing list for the libstdc++ project.
Re: [PATCH] Define std::to_chars and std::from_chars for C++17 (P0067R5, partial)
- From: Florian Weimer <fw at deneb dot enyo dot de>
- To: Jonathan Wakely <jwakely at redhat dot com>
- Cc: Ed Smith-Rowland <3dw4rd at verizon dot net>, "libstdc++\@gcc.gnu.org" <libstdc++ at gcc dot gnu dot org>
- Date: Wed, 12 Apr 2017 22:08:42 +0200
- Subject: Re: [PATCH] Define std::to_chars and std::from_chars for C++17 (P0067R5, partial)
- Authentication-results: sourceware.org; auth=none
- References: <firstname.lastname@example.org> <20170407232240.GC3412@redhat.com>
* Jonathan Wakely:
> That respects the locale, which std::from_chars explicitly ignores,
> but it's a lot of work nonetheless. I think we want to implement
> Grisu3 and then have something else as a slower fallback for the cases
> Grisu3 fails on.
We'd also want these algorithms in glibc, so that C programmers can
write proper JSON serializers.
(It's silly how many of them produce invalid JSON in certain locales,
and how few can properly round-trip all numbers.)