]> git.ipfire.org Git - thirdparty/gcc.git/commit - libstdc++-v3/ChangeLog
PR c++/90532 Ensure __is_constructible(T[]) is false
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 20 May 2019 11:32:51 +0000 (11:32 +0000)
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 20 May 2019 11:32:51 +0000 (11:32 +0000)
commit48328bff2581e059b518b24605eca6beaa3bbaf5
tree283b8a54c46647b461db6ecb01b894ed536af56d
parentbe61629badbcbd81ba2f25c41220f9339f42b71d
PR c++/90532 Ensure __is_constructible(T[]) is false

An array of an unknown bound is an incomplete type, so no object of such
a type can be constructed. This means __is_constructible should always
be false for an array of unknown bound.

This patch also changes the std::is_default_constructible trait to use
std::is_constructible, which now gives the right answer for arrays of
unknown bound.

gcc/cp:

PR c++/90532 Ensure __is_constructible(T[]) is false
* method.c (is_xible_helper): Return error_mark_node for construction
of an array of unknown bound.

gcc/testsuite:

PR c++/90532 Ensure __is_constructible(T[]) is false
* g++.dg/ext/90532.C: New test.

libstdc++-v3:

PR c++/90532 Ensure __is_constructible(T[]) is false
* include/std/type_traits (__do_is_default_constructible_impl)
(__is_default_constructible_atom, __is_default_constructible_safe):
Remove.
(is_default_constructible): Use is_constructible.
* testsuite/20_util/is_constructible/value.cc: Check int[] case.
* testsuite/20_util/is_default_constructible/value.cc: Likewise.
* testsuite/20_util/is_trivially_constructible/value.cc: Likewise.
* testsuite/20_util/is_trivially_default_constructible/value.cc:
Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@271412 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/cp/ChangeLog
gcc/cp/method.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/ext/90532.C [new file with mode: 0644]
libstdc++-v3/ChangeLog
libstdc++-v3/include/std/type_traits
libstdc++-v3/testsuite/20_util/is_constructible/value.cc
libstdc++-v3/testsuite/20_util/is_default_constructible/value.cc
libstdc++-v3/testsuite/20_util/is_trivially_constructible/value.cc
libstdc++-v3/testsuite/20_util/is_trivially_default_constructible/value.cc