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]

[PATCH] C++17 P0067R5 std::to_chars and std::from_chars (partial)


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.


Attachment: patch.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]