Skip to content

Commit

Permalink
C++17 P0067R5 std::to_chars and std::from_chars (partial)
Browse files Browse the repository at this point in the history
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.

	* 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.

From-SVN: r253353
  • Loading branch information
jwakely committed Oct 2, 2017
1 parent d1453be commit 804b7cc
Show file tree
Hide file tree
Showing 13 changed files with 1,883 additions and 0 deletions.
16 changes: 16 additions & 0 deletions libstdc++-v3/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
2017-10-02 Jonathan Wakely <jwakely@redhat.com>

* 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.

2017-09-27 François Dumont <fdumont@gcc.gnu.org>

* testsuite/22_locale/money_get/get/char/22131.cc: Make test less
Expand Down
1 change: 1 addition & 0 deletions libstdc++-v3/include/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ std_headers = \
${std_srcdir}/array \
${std_srcdir}/atomic \
${std_srcdir}/bitset \
${std_srcdir}/charconv \
${std_srcdir}/chrono \
${std_srcdir}/codecvt \
${std_srcdir}/complex \
Expand Down
1 change: 1 addition & 0 deletions libstdc++-v3/include/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ std_headers = \
${std_srcdir}/array \
${std_srcdir}/atomic \
${std_srcdir}/bitset \
${std_srcdir}/charconv \
${std_srcdir}/chrono \
${std_srcdir}/codecvt \
${std_srcdir}/complex \
Expand Down
4 changes: 4 additions & 0 deletions libstdc++-v3/include/precompiled/stdc++.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,7 @@
#if __cplusplus >= 201402L
#include <shared_mutex>
#endif

#if __cplusplus > 201402L
#include <charconv>
#endif

0 comments on commit 804b7cc

Please sign in to comment.