This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/86398] [8/9 Regression] is_trivially_constructible always returns true even when is_constructible returns false
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 04 Jul 2018 09:03:55 +0000
- Subject: [Bug libstdc++/86398] [8/9 Regression] is_trivially_constructible always returns true even when is_constructible returns false
- Auto-submitted: auto-generated
- References: <bug-86398-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86398
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Wed Jul 4 09:03:18 2018
New Revision: 262379
URL: https://gcc.gnu.org/viewcvs?rev=262379&root=gcc&view=rev
Log:
PR libstdc++/86398 fix std::is_trivially_constructible regression
The intrinsic doesn't check for allowed conversions between scalar
types, so restore the std::is_constructible check.
Also make some trivial whitespace changes.
PR libstdc++/86398
* include/std/type_traits (is_trivially_constructible): Check
is_constructible before __is_trivially_constructible.
* testsuite/20_util/is_trivially_constructible/value.cc: Add more
tests, including negative cases.
* testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Use
zero for dg-error lineno.
* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc:
Likewise.
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/std/type_traits
trunk/libstdc++-v3/testsuite/20_util/is_trivially_constructible/value.cc
trunk/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs_neg.cc
trunk/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc