Remove redundant static assertions in [meta.unary.prop] traits
authorJonathan Wakely <jwakely@redhat.com>
Thu, 6 Jun 2019 12:13:47 +0000 (13:13 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Thu, 6 Jun 2019 12:13:47 +0000 (13:13 +0100)
commit209ee62421fdeb177bdac29e670bc9b930bef4a3
treea96dc1ea03015db9f91d556938797031d7cef0ba
parent061a745005d69e44d6ff50e3ee7fd5b21194c6ac
Remove redundant static assertions in [meta.unary.prop] traits

The type property predicates that are implemented by a compiler builtin
already do the right checks in the compiler. The checks for complete
type or unbounded arrays were wrong for these types anyway.

* include/std/type_traits (is_empty, is_polymorphic, is_final)
(is_abstract, is_aggregate): Remove static_assert.
* testsuite/20_util/is_abstract/incomplete_neg.cc: Check for error
from builtin only.
* testsuite/20_util/is_aggregate/incomplete_neg.cc: Likewise. Add
missing -std=gnu++17 option.
* testsuite/20_util/is_empty/incomplete_neg.cc: New test.
* testsuite/20_util/is_final/incomplete_neg.cc: New test.
* testsuite/20_util/is_polymorphic/incomplete_neg.cc: Check for error
from builtin only.

From-SVN: r272000
libstdc++-v3/ChangeLog
libstdc++-v3/include/std/type_traits
libstdc++-v3/testsuite/20_util/is_abstract/incomplete_neg.cc
libstdc++-v3/testsuite/20_util/is_aggregate/incomplete_neg.cc
libstdc++-v3/testsuite/20_util/is_empty/incomplete_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/is_final/incomplete_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/is_polymorphic/incomplete_neg.cc