This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Mon, Oct 02, 2017 at 03:13:17PM +0100, Jonathan Wakely wrote: > This adds the integral overloads of std::to_chars and std::from_chars, > including the changes made by P0682R0. Support for floating point types > is absent. > > This uses a number of suggestions from Lars (thanks!) but I might have > missed some of his ideas and so could be missing some potential > optimizations. > > An earlier version of the patch was posted in > https://gcc.gnu.org/ml/libstdc++/2017-04/msg00025.html > > * include/Makefile.am: Add new <charconv> header. > * include/Makefile.in: Regenerate. > * include/precompiled/stdc++.h: Include <charconv>. > * include/std/charconv: New file. > (to_chars_result, to_chars, from_chars_result, from_chars): Define. > * testsuite/20_util/from_chars/1.cc: New test. > * testsuite/20_util/from_chars/1_neg.cc: New test. > * testsuite/20_util/from_chars/2.cc: New test. > * testsuite/20_util/from_chars/requirements.cc: New test. > * testsuite/20_util/to_chars/1.cc: New test. > * testsuite/20_util/to_chars/1_neg.cc: New test. > * testsuite/20_util/to_chars/2.cc: New test. > * testsuite/20_util/to_chars/requirements.cc: New test. > > Tested powerpc64le-linux, committed to trunk. This fails on 32-bit targets, there are too many closing >s if __int128_t is missing. Either of the attached patches fixes this, which one do you prefer (or do you want yet another formatting)? Jakub
Attachment:
1
Description: Text document
Attachment:
2
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |