]> gcc.gnu.org Git - gcc.git/commit
LWG 3266. to_chars(bool) should be deleted
authorJonathan Wakely <jwakely@redhat.com>
Tue, 10 Sep 2019 09:08:20 +0000 (10:08 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Tue, 10 Sep 2019 09:08:20 +0000 (10:08 +0100)
commit28f0075742ed5864991a1b0fef2ad6fae15c5e3b
tree7e38bb48bc714023dc2a9307fdf815dc5a6ed3cb
parent873140e65d4332557301db341eb40ed285e34c6d
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.

From-SVN: r275588
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]
This page took 0.061706 seconds and 5 git commands to generate.