]> git.ipfire.org Git - thirdparty/gcc.git/commit
LWG 3266. to_chars(bool) should be deleted
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 10 Sep 2019 09:08:20 +0000 (09:08 +0000)
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 10 Sep 2019 09:08:20 +0000 (09:08 +0000)
commitcd50420dfc2e8f4f02be7e62c92705790cad08eb
tree7e38bb48bc714023dc2a9307fdf815dc5a6ed3cb
parentf58c7f4de93c5ea8223ab914849392923df7a29a
LWG 3266. to_chars(bool) should be deleted

The standard requires overloads of std::to_chars for char and (un)signed
integer types. This means that our constrained function template is
non-conforming, because the difference is observable when using types
that convert to an integer (e.g. wchar_t, which promotes).

As well as defining the deleted bool overload for LWG 3266, replace the
constrained function template with overloads for each type.

* include/std/charconv (to_chars): Rename to __to_chars_i. Define
non-template overloads for each signed and unsigned integer type and
char. Define deleted overload for bool (LWG 3266).
* testsuite/20_util/to_chars/1_neg.cc: Remove.
* testsuite/20_util/to_chars/3.cc: New test.
* testsuite/20_util/to_chars/lwg3266.cc: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@275588 138bc75d-0d04-0410-961f-82ee72b054a4
libstdc++-v3/ChangeLog
libstdc++-v3/include/std/charconv
libstdc++-v3/testsuite/20_util/to_chars/3.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/to_chars/lwg3266.cc [moved from libstdc++-v3/testsuite/20_util/to_chars/1_neg.cc with 60% similarity]