summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libstdc++-v3/ChangeLog50
-rw-r--r--libstdc++-v3/testsuite/20_util/add_lvalue_reference/value.cc52
-rw-r--r--libstdc++-v3/testsuite/20_util/add_rvalue_reference/value.cc49
-rw-r--r--libstdc++-v3/testsuite/20_util/aligned_storage/value.cc39
-rw-r--r--libstdc++-v3/testsuite/20_util/has_trivial_copy_assign/value.cc51
-rw-r--r--libstdc++-v3/testsuite/20_util/has_trivial_copy_constructor/value.cc52
-rw-r--r--libstdc++-v3/testsuite/20_util/has_trivial_default_constructor/value.cc61
-rw-r--r--libstdc++-v3/testsuite/20_util/is_compound/value.cc49
-rw-r--r--libstdc++-v3/testsuite/20_util/is_constructible/value.cc26
-rw-r--r--libstdc++-v3/testsuite/20_util/is_convertible/value.cc146
-rw-r--r--libstdc++-v3/testsuite/20_util/is_copy_assignable/value.cc85
-rw-r--r--libstdc++-v3/testsuite/20_util/is_copy_constructible/value.cc91
-rw-r--r--libstdc++-v3/testsuite/20_util/is_floating_point/value.cc55
-rw-r--r--libstdc++-v3/testsuite/20_util/is_function/value.cc39
-rw-r--r--libstdc++-v3/testsuite/20_util/is_fundamental/value.cc47
-rw-r--r--libstdc++-v3/testsuite/20_util/is_integral/value.cc58
-rw-r--r--libstdc++-v3/testsuite/20_util/is_literal_type/value.cc36
-rw-r--r--libstdc++-v3/testsuite/20_util/is_lvalue_reference/value.cc21
-rw-r--r--libstdc++-v3/testsuite/20_util/is_member_function_pointer/value.cc46
-rw-r--r--libstdc++-v3/testsuite/20_util/is_member_object_pointer/value.cc39
-rw-r--r--libstdc++-v3/testsuite/20_util/is_member_pointer/value.cc41
-rw-r--r--libstdc++-v3/testsuite/20_util/is_move_assignable/value.cc84
-rw-r--r--libstdc++-v3/testsuite/20_util/is_move_constructible/value.cc91
-rw-r--r--libstdc++-v3/testsuite/20_util/is_nothrow_assignable/value.cc49
-rw-r--r--libstdc++-v3/testsuite/20_util/is_nothrow_constructible/value.cc87
-rw-r--r--libstdc++-v3/testsuite/20_util/is_nothrow_copy_assignable/value.cc96
-rw-r--r--libstdc++-v3/testsuite/20_util/is_nothrow_copy_constructible/value.cc97
-rw-r--r--libstdc++-v3/testsuite/20_util/is_nothrow_default_constructible/value.cc82
-rw-r--r--libstdc++-v3/testsuite/20_util/is_nothrow_move_assignable/value.cc96
-rw-r--r--libstdc++-v3/testsuite/20_util/is_nothrow_move_constructible/value.cc97
-rw-r--r--libstdc++-v3/testsuite/20_util/is_null_pointer/value.cc56
-rw-r--r--libstdc++-v3/testsuite/20_util/is_object/value.cc30
-rw-r--r--libstdc++-v3/testsuite/20_util/is_pod/value.cc53
-rw-r--r--libstdc++-v3/testsuite/20_util/is_reference/value.cc25
-rw-r--r--libstdc++-v3/testsuite/20_util/is_rvalue_reference/value.cc22
-rw-r--r--libstdc++-v3/testsuite/20_util/is_scalar/value.cc30
-rw-r--r--libstdc++-v3/testsuite/20_util/is_signed/value.cc53
-rw-r--r--libstdc++-v3/testsuite/20_util/is_standard_layout/value.cc20
-rw-r--r--libstdc++-v3/testsuite/20_util/is_trivial/value.cc20
-rw-r--r--libstdc++-v3/testsuite/20_util/is_trivially_destructible/value.cc19
-rw-r--r--libstdc++-v3/testsuite/20_util/is_unsigned/value.cc55
-rw-r--r--libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs-2.cc28
-rw-r--r--libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-1.cc32
-rw-r--r--libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-2.cc32
-rw-r--r--libstdc++-v3/testsuite/20_util/remove_reference/value.cc48
-rw-r--r--libstdc++-v3/testsuite/util/testsuite_tr1.h56
46 files changed, 1200 insertions, 1291 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 912b89fd0d1..e437e5eecbc 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,53 @@
+2013-12-06 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * testsuite/util/testsuite_tr1.h (test_category, test_property,
+ test_relationship): constexpr in c++11 mode.
+ * testsuite/20_util/add_lvalue_reference/value.cc: Use static_assert
+ and change to dg-do compile testcase.
+ * testsuite/20_util/add_rvalue_reference/value.cc: Likewise.
+ * testsuite/20_util/aligned_storage/value.cc: Likewise.
+ * testsuite/20_util/has_trivial_copy_assign/value.cc: Likewise.
+ * testsuite/20_util/has_trivial_copy_constructor/value.cc: Likewise.
+ * testsuite/20_util/has_trivial_default_constructor/value.cc: Likewise.
+ * testsuite/20_util/is_compound/value.cc: Likewise.
+ * testsuite/20_util/is_constructible/value.cc: Likewise.
+ * testsuite/20_util/is_convertible/value.cc: Likewise.
+ * testsuite/20_util/is_copy_assignable/value.cc: Likewise.
+ * testsuite/20_util/is_copy_constructible/value.cc: Likewise.
+ * testsuite/20_util/is_floating_point/value.cc: Likewise.
+ * testsuite/20_util/is_function/value.cc: Likewise.
+ * testsuite/20_util/is_fundamental/value.cc: Likewise.
+ * testsuite/20_util/is_integral/value.cc: Likewise.
+ * testsuite/20_util/is_literal_type/value.cc: Likewise.
+ * testsuite/20_util/is_lvalue_reference/value.cc: Likewise.
+ * testsuite/20_util/is_member_function_pointer/value.cc: Likewise.
+ * testsuite/20_util/is_member_object_pointer/value.cc: Likewise.
+ * testsuite/20_util/is_member_pointer/value.cc: Likewise.
+ * testsuite/20_util/is_move_assignable/value.cc: Likewise.
+ * testsuite/20_util/is_move_constructible/value.cc: Likewise.
+ * testsuite/20_util/is_nothrow_assignable/value.cc: Likewise.
+ * testsuite/20_util/is_nothrow_constructible/value.cc: Likewise.
+ * testsuite/20_util/is_nothrow_copy_assignable/value.cc: Likewise.
+ * testsuite/20_util/is_nothrow_copy_constructible/value.cc: Likewise.
+ * testsuite/20_util/is_nothrow_default_constructible/value.cc: Likewise.
+ * testsuite/20_util/is_nothrow_move_assignable/value.cc: Likewise.
+ * testsuite/20_util/is_nothrow_move_constructible/value.cc: Likewise.
+ * testsuite/20_util/is_null_pointer/value.cc: Likewise.
+ * testsuite/20_util/is_object/value.cc: Likewise.
+ * testsuite/20_util/is_pod/value.cc: Likewise.
+ * testsuite/20_util/is_reference/value.cc: Likewise.
+ * testsuite/20_util/is_rvalue_reference/value.cc: Likewise.
+ * testsuite/20_util/is_scalar/value.cc: Likewise.
+ * testsuite/20_util/is_signed/value.cc: Likewise.
+ * testsuite/20_util/is_standard_layout/value.cc: Likewise.
+ * testsuite/20_util/is_trivial/value.cc: Likewise.
+ * testsuite/20_util/is_trivially_destructible/value.cc: Likewise.
+ * testsuite/20_util/is_unsigned/value.cc: Likewise.
+ * testsuite/20_util/make_signed/requirements/typedefs-2.cc: Likewise.
+ * testsuite/20_util/make_unsigned/requirements/typedefs-1.cc: Likewise.
+ * testsuite/20_util/make_unsigned/requirements/typedefs-2.cc: Likewise.
+ * testsuite/20_util/remove_reference/value.cc: Likewise.
+
2013-12-03 Jonathan Wakely <jwakely.gcc@gmail.com>
* include/std/fstream (basic_filebuf::open): Use preformatted text
diff --git a/libstdc++-v3/testsuite/20_util/add_lvalue_reference/value.cc b/libstdc++-v3/testsuite/20_util/add_lvalue_reference/value.cc
index 152f03a6cb1..ed862865146 100644
--- a/libstdc++-v3/testsuite/20_util/add_lvalue_reference/value.cc
+++ b/libstdc++-v3/testsuite/20_util/add_lvalue_reference/value.cc
@@ -1,4 +1,6 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+
// 2007-06-02 Paolo Carlini <pcarlini@suse.de>
//
// Copyright (C) 2007-2013 Free Software Foundation, Inc.
@@ -19,35 +21,37 @@
// <http://www.gnu.org/licenses/>.
#include <type_traits>
-#include <testsuite_hooks.h>
#include <testsuite_tr1.h>
void test01()
{
- bool test __attribute__((unused)) = true;
using std::add_lvalue_reference;
using std::is_same;
using namespace __gnu_test;
- VERIFY( (is_same<add_lvalue_reference<int>::type, int&>::value) );
- VERIFY( (is_same<add_lvalue_reference<int&>::type, int&>::value) );
- VERIFY( (is_same<add_lvalue_reference<const int>::type, const int&>::value) );
- VERIFY( (is_same<add_lvalue_reference<int*>::type, int*&>::value) );
- VERIFY( (is_same<add_lvalue_reference<ClassType&>::type, ClassType&>::value) );
- VERIFY( (is_same<add_lvalue_reference<ClassType>::type, ClassType&>::value) );
- VERIFY( (is_same<add_lvalue_reference<int(int)>::type, int(&)(int)>::value) );
- VERIFY( (is_same<add_lvalue_reference<int&&>::type, int&>::value) );
- VERIFY( (is_same<add_lvalue_reference<ClassType&&>::type, ClassType&>::value) );
- VERIFY( (is_same<add_lvalue_reference<void>::type, void>::value) );
- VERIFY( (is_same<add_lvalue_reference<const void>::type, const void>::value) );
- VERIFY( (is_same<add_lvalue_reference<bool(int) const>::type, bool(int) const>::value) );
- VERIFY( (is_same<add_lvalue_reference<bool(int) &>::type, bool(int) &>::value) );
- VERIFY( (is_same<add_lvalue_reference<bool(int) const &&>::type, bool(int) const &&>::value) );
- VERIFY( (is_same<add_lvalue_reference<bool(int)>::type, bool(&)(int)>::value) );
-}
-
-int main()
-{
- test01();
- return 0;
+ static_assert(is_same<add_lvalue_reference<int>::type, int&>::value, "");
+ static_assert(is_same<add_lvalue_reference<int&>::type, int&>::value, "" );
+ static_assert(is_same<add_lvalue_reference<const int>::type,
+ const int&>::value, "");
+ static_assert(is_same<add_lvalue_reference<int*>::type, int*&>::value, "");
+ static_assert(is_same<add_lvalue_reference<ClassType&>::type,
+ ClassType&>::value, "");
+ static_assert(is_same<add_lvalue_reference<ClassType>::type,
+ ClassType&>::value, "");
+ static_assert(is_same<add_lvalue_reference<int(int)>::type,
+ int(&)(int)>::value, "");
+ static_assert(is_same<add_lvalue_reference<int&&>::type, int&>::value, "");
+ static_assert(is_same<add_lvalue_reference<ClassType&&>::type,
+ ClassType&>::value, "");
+ static_assert(is_same<add_lvalue_reference<void>::type, void>::value, "");
+ static_assert(is_same<add_lvalue_reference<const void>::type,
+ const void>::value, "");
+ static_assert(is_same<add_lvalue_reference<bool(int) const>::type,
+ bool(int) const>::value, "");
+ static_assert(is_same<add_lvalue_reference<bool(int) &>::type,
+ bool(int) &>::value, "");
+ static_assert(is_same<add_lvalue_reference<bool(int) const &&>::type,
+ bool(int) const &&>::value, "");
+ static_assert(is_same<add_lvalue_reference<bool(int)>::type,
+ bool(&)(int)>::value, "");
}
diff --git a/libstdc++-v3/testsuite/20_util/add_rvalue_reference/value.cc b/libstdc++-v3/testsuite/20_util/add_rvalue_reference/value.cc
index 7dcb1dcec98..468c438fdd1 100644
--- a/libstdc++-v3/testsuite/20_util/add_rvalue_reference/value.cc
+++ b/libstdc++-v3/testsuite/20_util/add_rvalue_reference/value.cc
@@ -1,4 +1,6 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+
// 2007-06-02 Paolo Carlini <pcarlini@suse.de>
//
// Copyright (C) 2007-2013 Free Software Foundation, Inc.
@@ -19,34 +21,35 @@
// <http://www.gnu.org/licenses/>.
#include <type_traits>
-#include <testsuite_hooks.h>
#include <testsuite_tr1.h>
void test01()
{
- bool test __attribute__((unused)) = true;
using std::add_rvalue_reference;
using std::is_same;
using namespace __gnu_test;
- VERIFY( (is_same<add_rvalue_reference<int>::type, int&&>::value) );
- VERIFY( (is_same<add_rvalue_reference<int&&>::type, int&&>::value) );
- VERIFY( (is_same<add_rvalue_reference<int&>::type, int&>::value) );
- VERIFY( (is_same<add_rvalue_reference<const int>::type, const int&&>::value) );
- VERIFY( (is_same<add_rvalue_reference<int*>::type, int*&&>::value) );
- VERIFY( (is_same<add_rvalue_reference<ClassType&&>::type, ClassType&&>::value) );
- VERIFY( (is_same<add_rvalue_reference<ClassType>::type, ClassType&&>::value) );
- VERIFY( (is_same<add_rvalue_reference<int(int)>::type, int(&&)(int)>::value) );
- VERIFY( (is_same<add_rvalue_reference<void>::type, void>::value) );
- VERIFY( (is_same<add_rvalue_reference<const void>::type, const void>::value) );
- VERIFY( (is_same<add_rvalue_reference<bool(int) const>::type, bool(int) const>::value) );
- VERIFY( (is_same<add_rvalue_reference<bool(int) &>::type, bool(int) &>::value) );
- VERIFY( (is_same<add_rvalue_reference<bool(int) const &&>::type, bool(int) const &&>::value) );
- VERIFY( (is_same<add_rvalue_reference<bool(int)>::type, bool(&&)(int)>::value) );
-}
-
-int main()
-{
- test01();
- return 0;
+ static_assert(is_same<add_rvalue_reference<int>::type, int&&>::value, "");
+ static_assert(is_same<add_rvalue_reference<int&&>::type, int&&>::value, "");
+ static_assert(is_same<add_rvalue_reference<int&>::type, int&>::value, "");
+ static_assert(is_same<add_rvalue_reference<const int>::type,
+ const int&&>::value, "");
+ static_assert(is_same<add_rvalue_reference<int*>::type, int*&&>::value, "");
+ static_assert(is_same<add_rvalue_reference<ClassType&&>::type,
+ ClassType&&>::value, "");
+ static_assert(is_same<add_rvalue_reference<ClassType>::type,
+ ClassType&&>::value, "");
+ static_assert(is_same<add_rvalue_reference<int(int)>::type,
+ int(&&)(int)>::value, "");
+ static_assert(is_same<add_rvalue_reference<void>::type, void>::value, "");
+ static_assert(is_same<add_rvalue_reference<const void>::type,
+ const void>::value, "");
+ static_assert(is_same<add_rvalue_reference<bool(int) const>::type,
+ bool(int) const>::value, "");
+ static_assert(is_same<add_rvalue_reference<bool(int) &>::type,
+ bool(int) &>::value, "");
+ static_assert(is_same<add_rvalue_reference<bool(int) const &&>::type,
+ bool(int) const &&>::value, "");
+ static_assert(is_same<add_rvalue_reference<bool(int)>::type,
+ bool(&&)(int)>::value, "");
}
diff --git a/libstdc++-v3/testsuite/20_util/aligned_storage/value.cc b/libstdc++-v3/testsuite/20_util/aligned_storage/value.cc
index adae72158d5..4edbdbed793 100644
--- a/libstdc++-v3/testsuite/20_util/aligned_storage/value.cc
+++ b/libstdc++-v3/testsuite/20_util/aligned_storage/value.cc
@@ -1,4 +1,5 @@
// { dg-options "-std=gnu++0x" }
+// { dg-do compile }
// 2007-09-17 Paolo Carlini <pcarlini@suse.de>
//
// Copyright (C) 2007-2013 Free Software Foundation, Inc.
@@ -19,49 +20,43 @@
// <http://www.gnu.org/licenses/>.
#include <type_traits>
-#include <testsuite_hooks.h>
#include <testsuite_tr1.h>
struct MSAlignType { } __attribute__((__aligned__));
void test01()
{
- bool test __attribute__((unused)) = true;
using std::aligned_storage;
using std::alignment_of;
using namespace __gnu_test;
const std::size_t align_c = alignment_of<char>::value;
- VERIFY( (sizeof(aligned_storage<4, align_c>::type) >= 4) );
- VERIFY( (__alignof__(aligned_storage<4, align_c>::type) == align_c) );
+ static_assert(sizeof(aligned_storage<4, align_c>::type) >= 4, "");
+ static_assert(__alignof__(aligned_storage<4, align_c>::type) == align_c, "");
const std::size_t align_s = alignment_of<short>::value;
- VERIFY( (sizeof(aligned_storage<1, align_s>::type) >= 1) );
- VERIFY( (__alignof__(aligned_storage<1, align_s>::type) == align_s) );
+ static_assert(sizeof(aligned_storage<1, align_s>::type) >= 1, "");
+ static_assert(__alignof__(aligned_storage<1, align_s>::type) == align_s, "");
const std::size_t align_i = alignment_of<int>::value;
- VERIFY( (sizeof(aligned_storage<7, align_i>::type) >= 7) );
- VERIFY( (__alignof__(aligned_storage<7, align_i>::type) == align_i) );
+ static_assert(sizeof(aligned_storage<7, align_i>::type) >= 7, "");
+ static_assert(__alignof__(aligned_storage<7, align_i>::type) == align_i, "");
const std::size_t align_d = alignment_of<double>::value;
- VERIFY( (sizeof(aligned_storage<2, align_d>::type) >= 2) );
- VERIFY( (__alignof__(aligned_storage<2, align_d>::type) == align_d) );
+ static_assert(sizeof(aligned_storage<2, align_d>::type) >= 2, "");
+ static_assert(__alignof__(aligned_storage<2, align_d>::type) == align_d, "");
const std::size_t align_ai = alignment_of<int[4]>::value;
- VERIFY( (sizeof(aligned_storage<20, align_ai>::type) >= 20) );
- VERIFY( (__alignof__(aligned_storage<20, align_ai>::type) == align_ai) );
+ static_assert(sizeof(aligned_storage<20, align_ai>::type) >= 20, "");
+ static_assert(__alignof__(aligned_storage<20, align_ai>::type) == align_ai,
+ "");
const std::size_t align_ct = alignment_of<ClassType>::value;
- VERIFY( (sizeof(aligned_storage<11, align_ct>::type) >= 11) );
- VERIFY( (__alignof__(aligned_storage<11, align_ct>::type) == align_ct) );
+ static_assert(sizeof(aligned_storage<11, align_ct>::type) >= 11, "");
+ static_assert(__alignof__(aligned_storage<11, align_ct>::type) == align_ct,
+ "");
const std::size_t align_msa = alignment_of<MSAlignType>::value;
- VERIFY( (sizeof(aligned_storage<5>::type) >= 5) );
- VERIFY( (__alignof__(aligned_storage<5>::type) == align_msa) );
-}
-
-int main()
-{
- test01();
- return 0;
+ static_assert(sizeof(aligned_storage<5>::type) >= 5, "");
+ static_assert(__alignof__(aligned_storage<5>::type) == align_msa, "");
}
diff --git a/libstdc++-v3/testsuite/20_util/has_trivial_copy_assign/value.cc b/libstdc++-v3/testsuite/20_util/has_trivial_copy_assign/value.cc
index cbb6a02c9f2..3e7568d0bb0 100644
--- a/libstdc++-v3/testsuite/20_util/has_trivial_copy_assign/value.cc
+++ b/libstdc++-v3/testsuite/20_util/has_trivial_copy_assign/value.cc
@@ -1,4 +1,6 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+
// 2010-06-08 Paolo Carlini <paolo.carlini@oracle.com>
//
// Copyright (C) 2010-2013 Free Software Foundation, Inc.
@@ -19,39 +21,34 @@
// <http://www.gnu.org/licenses/>.
#include <type_traits>
-#include <testsuite_hooks.h>
#include <testsuite_tr1.h>
void test01()
{
- bool test __attribute__((unused)) = true;
using std::has_trivial_copy_assign;
using namespace __gnu_test;
- VERIFY( (test_property<has_trivial_copy_assign, int>(true)) );
- VERIFY( (test_property<has_trivial_copy_assign, float>(true)) );
- VERIFY( (test_property<has_trivial_copy_assign, EnumType>(true)) );
- VERIFY( (test_property<has_trivial_copy_assign, int*>(true)) );
- VERIFY( (test_property<has_trivial_copy_assign, int(*)(int)>(true)) );
- VERIFY( (test_property<has_trivial_copy_assign, int (ClassType::*)>(true)) );
- VERIFY( (test_property<has_trivial_copy_assign,
- int (ClassType::*) (int)>(true)) );
- VERIFY( (test_property<has_trivial_copy_assign, int[2]>(true)) );
- VERIFY( (test_property<has_trivial_copy_assign, float[][3]>(true)) );
- VERIFY( (test_property<has_trivial_copy_assign, EnumType[2][3][4]>(true)) );
- VERIFY( (test_property<has_trivial_copy_assign, int*[3]>(true)) );
- VERIFY( (test_property<has_trivial_copy_assign, int(*[][2])(int)>(true)) );
- VERIFY( (test_property<has_trivial_copy_assign,
- int (ClassType::*[2][3])>(true)) );
- VERIFY( (test_property<has_trivial_copy_assign,
- int (ClassType::*[][2][3]) (int)>(true)) );
+ static_assert(test_property<has_trivial_copy_assign, int>(true), "");
+ static_assert(test_property<has_trivial_copy_assign, float>(true), "");
+ static_assert(test_property<has_trivial_copy_assign, EnumType>(true), "");
+ static_assert(test_property<has_trivial_copy_assign, int*>(true), "");
+ static_assert(test_property<has_trivial_copy_assign, int(*)(int)>(true), "");
+ static_assert(test_property<has_trivial_copy_assign,
+ int (ClassType::*)>(true), "");
+ static_assert(test_property<has_trivial_copy_assign,
+ int (ClassType::*) (int)>(true), "");
+ static_assert(test_property<has_trivial_copy_assign, int[2]>(true), "");
+ static_assert(test_property<has_trivial_copy_assign, float[][3]>(true), "");
+ static_assert(test_property<has_trivial_copy_assign,
+ EnumType[2][3][4]>(true), "");
+ static_assert(test_property<has_trivial_copy_assign, int*[3]>(true), "");
+ static_assert(test_property<has_trivial_copy_assign,
+ int(*[][2])(int)>(true), "");
+ static_assert(test_property<has_trivial_copy_assign,
+ int (ClassType::*[2][3])>(true), "");
+ static_assert(test_property<has_trivial_copy_assign,
+ int (ClassType::*[][2][3]) (int)>(true), "");
// Negative tests.
- VERIFY( (test_property<has_trivial_copy_assign, void>(false)) );
-}
-
-int main()
-{
- test01();
- return 0;
+ static_assert(test_property<has_trivial_copy_assign, void>(false), "");
}
diff --git a/libstdc++-v3/testsuite/20_util/has_trivial_copy_constructor/value.cc b/libstdc++-v3/testsuite/20_util/has_trivial_copy_constructor/value.cc
index a103a3c2f92..5e91308de50 100644
--- a/libstdc++-v3/testsuite/20_util/has_trivial_copy_constructor/value.cc
+++ b/libstdc++-v3/testsuite/20_util/has_trivial_copy_constructor/value.cc
@@ -1,4 +1,6 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+
// 2004-12-30 Paolo Carlini <pcarlini@suse.de>
//
// Copyright (C) 2004-2013 Free Software Foundation, Inc.
@@ -21,38 +23,38 @@
// 4.5.3 Type properties
#include <type_traits>
-#include <testsuite_hooks.h>
#include <testsuite_tr1.h>
void test01()
{
- bool test __attribute__((unused)) = true;
using std::has_trivial_copy_constructor;
using namespace __gnu_test;
// Positive tests.
- VERIFY( (test_category<has_trivial_copy_constructor, int>(true)) );
- VERIFY( (test_category<has_trivial_copy_constructor, float>(true)) );
- VERIFY( (test_category<has_trivial_copy_constructor, EnumType>(true)) );
- VERIFY( (test_category<has_trivial_copy_constructor, int*>(true)) );
- VERIFY( (test_category<has_trivial_copy_constructor, int(*)(int)>(true)) );
- VERIFY( (test_category<has_trivial_copy_constructor, int (ClassType::*)>(true)) );
- VERIFY( (test_category<has_trivial_copy_constructor, int (ClassType::*) (int)>(true)) );
- VERIFY( (test_category<has_trivial_copy_constructor, int[2]>(true)) );
- VERIFY( (test_category<has_trivial_copy_constructor, float[][3]>(true)) );
- VERIFY( (test_category<has_trivial_copy_constructor, EnumType[2][3][4]>(true)) );
- VERIFY( (test_category<has_trivial_copy_constructor, int*[3]>(true)) );
- VERIFY( (test_category<has_trivial_copy_constructor, int(*[][2])(int)>(true)) );
- VERIFY( (test_category<has_trivial_copy_constructor, int (ClassType::*[2][3])>(true)) );
- VERIFY( (test_category<has_trivial_copy_constructor,
- int (ClassType::*[][2][3]) (int)>(true)) );
+ static_assert(test_category<has_trivial_copy_constructor, int>(true), "");
+ static_assert(test_category<has_trivial_copy_constructor, float>(true), "");
+ static_assert(test_category<has_trivial_copy_constructor,
+ EnumType>(true), "");
+ static_assert(test_category<has_trivial_copy_constructor, int*>(true), "");
+ static_assert(test_category<has_trivial_copy_constructor,
+ int(*)(int)>(true), "");
+ static_assert(test_category<has_trivial_copy_constructor,
+ int (ClassType::*)>(true), "");
+ static_assert(test_category<has_trivial_copy_constructor,
+ int (ClassType::*) (int)>(true), "");
+ static_assert(test_category<has_trivial_copy_constructor, int[2]>(true), "");
+ static_assert(test_category<has_trivial_copy_constructor,
+ float[][3]>(true), "");
+ static_assert(test_category<has_trivial_copy_constructor,
+ EnumType[2][3][4]>(true), "");
+ static_assert(test_category<has_trivial_copy_constructor, int*[3]>(true), "");
+ static_assert(test_category<has_trivial_copy_constructor,
+ int(*[][2])(int)>(true), "");
+ static_assert(test_category<has_trivial_copy_constructor,
+ int (ClassType::*[2][3])>(true), "");
+ static_assert(test_category<has_trivial_copy_constructor,
+ int (ClassType::*[][2][3]) (int)>(true), "");
// Negative tests.
- VERIFY( (test_category<has_trivial_copy_constructor, void>(false)) );
-}
-
-int main()
-{
- test01();
- return 0;
+ static_assert(test_category<has_trivial_copy_constructor, void>(false), "");
}
diff --git a/libstdc++-v3/testsuite/20_util/has_trivial_default_constructor/value.cc b/libstdc++-v3/testsuite/20_util/has_trivial_default_constructor/value.cc
index 8bc930cfdd6..c04908633a7 100644
--- a/libstdc++-v3/testsuite/20_util/has_trivial_default_constructor/value.cc
+++ b/libstdc++-v3/testsuite/20_util/has_trivial_default_constructor/value.cc
@@ -1,4 +1,6 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+
// 2004-12-26 Paolo Carlini <pcarlini@suse.de>
//
// Copyright (C) 2004-2013 Free Software Foundation, Inc.
@@ -21,41 +23,44 @@
// 4.5.3 Type properties
#include <type_traits>
-#include <testsuite_hooks.h>
#include <testsuite_tr1.h>
void test01()
{
- bool test __attribute__((unused)) = true;
using std::has_trivial_default_constructor;
using namespace __gnu_test;
// Positive tests.
- VERIFY( (test_category<has_trivial_default_constructor, int>(true)) );
- VERIFY( (test_category<has_trivial_default_constructor, float>(true)) );
- VERIFY( (test_category<has_trivial_default_constructor, EnumType>(true)) );
- VERIFY( (test_category<has_trivial_default_constructor, int*>(true)) );
- VERIFY( (test_category<has_trivial_default_constructor, int(*)(int)>(true)) );
- VERIFY( (test_category<has_trivial_default_constructor, int (ClassType::*)>(true)) );
- VERIFY( (test_category<has_trivial_default_constructor,
- int (ClassType::*) (int)>(true)) );
- VERIFY( (test_category<has_trivial_default_constructor, int[2]>(true)) );
- VERIFY( (test_category<has_trivial_default_constructor, float[][3]>(true)) );
- VERIFY( (test_category<has_trivial_default_constructor, EnumType[2][3][4]>(true)) );
- VERIFY( (test_category<has_trivial_default_constructor, int*[3]>(true)) );
- VERIFY( (test_category<has_trivial_default_constructor, int(*[][2])(int)>(true)) );
- VERIFY( (test_category<has_trivial_default_constructor,
- int (ClassType::*[2][3])>(true)) );
- VERIFY( (test_category<has_trivial_default_constructor,
- int (ClassType::*[][2][3]) (int)>(true)) );
- VERIFY( (test_category<has_trivial_default_constructor, ClassType>(true)) );
+ static_assert(test_category<has_trivial_default_constructor, int>(true), "");
+ static_assert(test_category<has_trivial_default_constructor,
+ float>(true), "");
+ static_assert(test_category<has_trivial_default_constructor,
+ EnumType>(true), "");
+ static_assert(test_category<has_trivial_default_constructor, int*>(true), "");
+ static_assert(test_category<has_trivial_default_constructor,
+ int(*)(int)>(true), "");
+ static_assert(test_category<has_trivial_default_constructor,
+ int (ClassType::*)>(true), "");
+ static_assert(test_category<has_trivial_default_constructor,
+ int (ClassType::*) (int)>(true), "");
+ static_assert(test_category<has_trivial_default_constructor,
+ int[2]>(true), "");
+ static_assert(test_category<has_trivial_default_constructor,
+ float[][3]>(true), "");
+ static_assert(test_category<has_trivial_default_constructor,
+ EnumType[2][3][4]>(true), "");
+ static_assert(test_category<has_trivial_default_constructor,
+ int*[3]>(true), "");
+ static_assert(test_category<has_trivial_default_constructor,
+ int(*[][2])(int)>(true), "");
+ static_assert(test_category<has_trivial_default_constructor,
+ int (ClassType::*[2][3])>(true), "");
+ static_assert(test_category<has_trivial_default_constructor,
+ int (ClassType::*[][2][3]) (int)>(true), "");
+ static_assert(test_category<has_trivial_default_constructor,
+ ClassType>(true), "");
// Negative tests.
- VERIFY( (test_category<has_trivial_default_constructor, void>(false)) );
-}
-
-int main()
-{
- test01();
- return 0;
+ static_assert(test_category<has_trivial_default_constructor,
+ void>(false), "");
}
diff --git a/libstdc++-v3/testsuite/20_util/is_compound/value.cc b/libstdc++-v3/testsuite/20_util/is_compound/value.cc
index 936b7366663..ac04f55081f 100644
--- a/libstdc++-v3/testsuite/20_util/is_compound/value.cc
+++ b/libstdc++-v3/testsuite/20_util/is_compound/value.cc
@@ -1,4 +1,5 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
// Copyright (C) 2011-2013 Free Software Foundation, Inc.
//
@@ -18,43 +19,35 @@
// <http://www.gnu.org/licenses/>.
#include <type_traits>
-#include <testsuite_hooks.h>
#include <testsuite_tr1.h>
void test01()
{
- bool test __attribute__((unused)) = true;
using std::is_compound;
using namespace __gnu_test;
-
- VERIFY( (test_category<is_compound, void>(false)) );
- VERIFY( (test_category<is_compound, char>(false)) );
- VERIFY( (test_category<is_compound, signed char>(false)) );
- VERIFY( (test_category<is_compound, unsigned char>(false)) );
+
+ static_assert(test_category<is_compound, void>(false), "");
+ static_assert(test_category<is_compound, char>(false), "");
+ static_assert(test_category<is_compound, signed char>(false), "");
+ static_assert(test_category<is_compound, unsigned char>(false), "");
#ifdef _GLIBCXX_USE_WCHAR_T
- VERIFY( (test_category<is_compound, wchar_t>(false)) );
+ static_assert(test_category<is_compound, wchar_t>(false), "");
#endif
- VERIFY( (test_category<is_compound, short>(false)) );
- VERIFY( (test_category<is_compound, unsigned short>(false)) );
- VERIFY( (test_category<is_compound, int>(false)) );
- VERIFY( (test_category<is_compound, unsigned int>(false)) );
- VERIFY( (test_category<is_compound, long>(false)) );
- VERIFY( (test_category<is_compound, unsigned long>(false)) );
- VERIFY( (test_category<is_compound, long long>(false)) );
- VERIFY( (test_category<is_compound, unsigned long long>(false)) );
- VERIFY( (test_category<is_compound, float>(false)) );
- VERIFY( (test_category<is_compound, double>(false)) );
- VERIFY( (test_category<is_compound, long double>(false)) );
+ static_assert(test_category<is_compound, short>(false), "");
+ static_assert(test_category<is_compound, unsigned short>(false), "");
+ static_assert(test_category<is_compound, int>(false), "");
+ static_assert(test_category<is_compound, unsigned int>(false), "");
+ static_assert(test_category<is_compound, long>(false), "");
+ static_assert(test_category<is_compound, unsigned long>(false), "");
+ static_assert(test_category<is_compound, long long>(false), "");
+ static_assert(test_category<is_compound, unsigned long long>(false), "");
+ static_assert(test_category<is_compound, float>(false), "");
+ static_assert(test_category<is_compound, double>(false), "");
+ static_assert(test_category<is_compound, long double>(false), "");
// libstdc++/56609
- VERIFY( (test_category<is_compound, std::nullptr_t>(false)) );
+ static_assert(test_category<is_compound, std::nullptr_t>(false), "");
// Sanity check.
- VERIFY( (test_category<is_compound, ClassType>(true)) );
-}
-
-int main()
-{
- test01();
- return 0;
+ static_assert(test_category<is_compound, ClassType>(true), "");
}
diff --git a/libstdc++-v3/testsuite/20_util/is_constructible/value.cc b/libstdc++-v3/testsuite/20_util/is_constructible/value.cc
index 25810f0bfdc..bfd9f144e34 100644
--- a/libstdc++-v3/testsuite/20_util/is_constructible/value.cc
+++ b/libstdc++-v3/testsuite/20_util/is_constructible/value.cc
@@ -1,5 +1,5 @@
-// { dg-options "-std=gnu++0x" }
-
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
// Copyright (C) 2009-2013 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -18,28 +18,22 @@
// <http://www.gnu.org/licenses/>.
#include <type_traits>
-#include <testsuite_hooks.h>
#include <testsuite_tr1.h>
void test01()
{
- bool test __attribute__((unused)) = true;
using std::is_constructible;
using namespace __gnu_test;
// Positive tests.
- VERIFY( (test_property<is_constructible, ExplicitClass, double&>(true)) );
- VERIFY( (test_property<is_constructible, ExplicitClass, int&>(true)) );
+ static_assert(test_property<is_constructible,
+ ExplicitClass, double&>(true), "");
+ static_assert(test_property<is_constructible, ExplicitClass, int&>(true), "");
// Negative tests.
- VERIFY( (test_property<is_constructible, ExplicitClass, void*>(false)) );
- VERIFY( (test_property<is_constructible, ExplicitClass>(false)) );
- VERIFY( (test_property<is_constructible, ExplicitClass,
- int, double>(false)) );
-}
-
-int main()
-{
- test01();
- return 0;
+ static_assert(test_property<is_constructible,
+ ExplicitClass, void*>(false), "");
+ static_assert(test_property<is_constructible, ExplicitClass>(false), "");
+ static_assert(test_property<is_constructible, ExplicitClass,
+ int, double>(false), "");
}
diff --git a/libstdc++-v3/testsuite/20_util/is_convertible/value.cc b/libstdc++-v3/testsuite/20_util/is_convertible/value.cc
index 000458a2955..97518a4dd2a 100644
--- a/libstdc++-v3/testsuite/20_util/is_convertible/value.cc
+++ b/libstdc++-v3/testsuite/20_util/is_convertible/value.cc
@@ -1,4 +1,5 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
// 2009-10-29 Paolo Carlini <paolo.carlini@oracle.com>
//
@@ -20,87 +21,98 @@
// <http://www.gnu.org/licenses/>.
#include <type_traits>
-#include <testsuite_hooks.h>
#include <testsuite_tr1.h>
void test01()
{
- bool test __attribute__((unused)) = true;
using std::is_convertible;
using namespace __gnu_test;
// Positive tests.
- VERIFY( (test_relationship<is_convertible, int, int>(true)) );
- VERIFY( (test_relationship<is_convertible, int, const int>(true)) );
- VERIFY( (test_relationship<is_convertible, volatile int, const int>(true)) );
- VERIFY( (test_relationship<is_convertible, int, float>(true)) );
- VERIFY( (test_relationship<is_convertible, double, float>(true)) );
- VERIFY( (test_relationship<is_convertible, float, int>(true)) );
- VERIFY( (test_relationship<is_convertible, int*, const int*>(true)) );
- VERIFY( (test_relationship<is_convertible, int*, void*>(true)) );
- VERIFY( (test_relationship<is_convertible, int[4], int*>(true)) );
- VERIFY( (test_relationship<is_convertible, float&, int>(true)) );
- VERIFY( (test_relationship<is_convertible, int, const int&>(true)) );
- VERIFY( (test_relationship<is_convertible, const int&, int>(true)) );
- VERIFY( (test_relationship<is_convertible, float, const int&>(true)) );
- VERIFY( (test_relationship<is_convertible, int(int), int(*)(int)>(true)) );
- VERIFY( (test_relationship<is_convertible, int(&)(int), int(*)(int)>(true)) );
- VERIFY( (test_relationship<is_convertible, EnumType, int>(true)) );
- VERIFY( (test_relationship<is_convertible, ClassType, ClassType>(true)) );
- VERIFY( (test_relationship<is_convertible, DerivedType, ClassType>(true)) );
- VERIFY( (test_relationship<is_convertible, DerivedType*, ClassType*>(true)) );
- VERIFY( (test_relationship<is_convertible, DerivedType&, ClassType&>(true)) );
+ static_assert(test_relationship<is_convertible, int, int>(true), "");
+ static_assert(test_relationship<is_convertible, int, const int>(true), "");
+ static_assert(test_relationship<is_convertible,
+ volatile int, const int>(true), "");
+ static_assert(test_relationship<is_convertible, int, float>(true), "");
+ static_assert(test_relationship<is_convertible, double, float>(true), "");
+ static_assert(test_relationship<is_convertible, float, int>(true), "");
+ static_assert(test_relationship<is_convertible, int*, const int*>(true), "");
+ static_assert(test_relationship<is_convertible, int*, void*>(true), "");
+ static_assert(test_relationship<is_convertible, int[4], int*>(true), "");
+ static_assert(test_relationship<is_convertible, float&, int>(true), "");
+ static_assert(test_relationship<is_convertible, int, const int&>(true), "");
+ static_assert(test_relationship<is_convertible, const int&, int>(true), "");
+ static_assert(test_relationship<is_convertible, float, const int&>(true), "");
+ static_assert(test_relationship<is_convertible, int(int),
+ int(*)(int)>(true), "");
+ static_assert(test_relationship<is_convertible,
+ int(&)(int), int(*)(int)>(true), "");
+ static_assert(test_relationship<is_convertible, EnumType, int>(true), "");
+ static_assert(test_relationship<is_convertible, ClassType,
+ ClassType>(true), "");
+ static_assert(test_relationship<is_convertible, DerivedType,
+ ClassType>(true), "");
+ static_assert(test_relationship<is_convertible, DerivedType*,
+ ClassType*>(true), "");
+ static_assert(test_relationship<is_convertible, DerivedType&,
+ ClassType&>(true), "");
- VERIFY( (test_relationship<is_convertible, const int, const int&>(true)) );
+ static_assert(test_relationship<is_convertible, const int,
+ const int&>(true), "");
- VERIFY( (test_relationship<is_convertible, void, void>(true)) );
- VERIFY( (test_relationship<is_convertible, const void, void>(true)) );
- VERIFY( (test_relationship<is_convertible, void, volatile void>(true)) );
- VERIFY( (test_relationship<is_convertible, double&, ExplicitClass>(true)) );
+ static_assert(test_relationship<is_convertible, void, void>(true), "");
+ static_assert(test_relationship<is_convertible, const void, void>(true), "");
+ static_assert(test_relationship<is_convertible, void,
+ volatile void>(true), "");
+ static_assert(test_relationship<is_convertible, double&,
+ ExplicitClass>(true), "");
- VERIFY( (test_relationship<is_convertible, int(int), int(&)(int)>(true)) );
+ static_assert(test_relationship<is_convertible, int(int),
+ int(&)(int)>(true), "");
// Negative tests.
- VERIFY( (test_relationship<is_convertible, const int*, int*>(false)) );
- VERIFY( (test_relationship<is_convertible, int*, float*>(false)) );
- VERIFY( (test_relationship<is_convertible, const int[4], int*>(false)) );
- VERIFY( (test_relationship<is_convertible, int[4], int[4]>(false)) );
- VERIFY( (test_relationship<is_convertible, const int&, int&>(false)) );
- VERIFY( (test_relationship<is_convertible, float&, int&>(false)) );
- VERIFY( (test_relationship<is_convertible, float, volatile int&>(false)) );
- VERIFY( (test_relationship<is_convertible, int(int), int(int)>(false)) );
- VERIFY( (test_relationship<is_convertible, int(int), int(*)(void)>(false)) );
- VERIFY( (test_relationship<is_convertible, int(*)(int),
- int(&)(int)>(false)) );
- VERIFY( (test_relationship<is_convertible, int, EnumType>(false)) );
- VERIFY( (test_relationship<is_convertible, int, ClassType>(false)) );
- VERIFY( (test_relationship<is_convertible, ClassType, DerivedType>(false)) );
- VERIFY( (test_relationship<is_convertible, ClassType*,
- DerivedType*>(false)) );
- VERIFY( (test_relationship<is_convertible, ClassType&,
- DerivedType&>(false)) );
+ static_assert(test_relationship<is_convertible, const int*, int*>(false), "");
+ static_assert(test_relationship<is_convertible, int*, float*>(false), "");
+ static_assert(test_relationship<is_convertible, const int[4],
+ int*>(false), "");
+ static_assert(test_relationship<is_convertible, int[4], int[4]>(false), "");
+ static_assert(test_relationship<is_convertible, const int&, int&>(false), "");
+ static_assert(test_relationship<is_convertible, float&, int&>(false), "");
+ static_assert(test_relationship<is_convertible, float,
+ volatile int&>(false), "");
+ static_assert(test_relationship<is_convertible, int(int),
+ int(int)>(false), "");
+ static_assert(test_relationship<is_convertible, int(int),
+ int(*)(void)>(false), "");
+ static_assert(test_relationship<is_convertible, int(*)(int),
+ int(&)(int)>(false), "");
+ static_assert(test_relationship<is_convertible, int, EnumType>(false), "");
+ static_assert(test_relationship<is_convertible, int, ClassType>(false), "");
+ static_assert(test_relationship<is_convertible, ClassType,
+ DerivedType>(false), "");
+ static_assert(test_relationship<is_convertible, ClassType*,
+ DerivedType*>(false), "");
+ static_assert(test_relationship<is_convertible, ClassType&,
+ DerivedType&>(false), "");
- VERIFY( (test_relationship<is_convertible, void, int>(false)) );
- VERIFY( (test_relationship<is_convertible, void, float>(false)) );
- VERIFY( (test_relationship<is_convertible, void, int(*)(int)>(false)) );
+ static_assert(test_relationship<is_convertible, void, int>(false), "");
+ static_assert(test_relationship<is_convertible, void, float>(false), "");
+ static_assert(test_relationship<is_convertible, void,
+ int(*)(int)>(false), "");
// C++0x
- VERIFY( (test_relationship<is_convertible, int, void>(false)) );
- VERIFY( (test_relationship<is_convertible, int[4], void>(false)) );
+ static_assert(test_relationship<is_convertible, int, void>(false), "");
+ static_assert(test_relationship<is_convertible, int[4], void>(false), "");
- VERIFY( (test_relationship<is_convertible, int, int&>(false)) );
- VERIFY( (test_relationship<is_convertible, float,
- volatile float&>(false)) );
- VERIFY( (test_relationship<is_convertible, const volatile int,
- const volatile int&>(false)) );
- VERIFY( (test_relationship<is_convertible, volatile int,
- volatile int&>(false)) );
- VERIFY( (test_relationship<is_convertible, int&, ExplicitClass>(false)) );
- VERIFY( (test_relationship<is_convertible, void*, ExplicitClass>(false)) );
-}
-
-int main()
-{
- test01();
- return 0;
+ static_assert(test_relationship<is_convertible, int, int&>(false), "");
+ static_assert(test_relationship<is_convertible, float,
+ volatile float&>(false), "");
+ static_assert(test_relationship<is_convertible, const volatile int,
+ const volatile int&>(false), "");
+ static_assert(test_relationship<is_convertible, volatile int,
+ volatile int&>(false), "");
+ static_assert(test_relationship<is_convertible, int&,
+ ExplicitClass>(false), "");
+ static_assert(test_relationship<is_convertible, void*,
+ ExplicitClass>(false), "");
}
diff --git a/libstdc++-v3/testsuite/20_util/is_copy_assignable/value.cc b/libstdc++-v3/testsuite/20_util/is_copy_assignable/value.cc
index af5e3ba777a..4cc12d6e521 100644
--- a/libstdc++-v3/testsuite/20_util/is_copy_assignable/value.cc
+++ b/libstdc++-v3/testsuite/20_util/is_copy_assignable/value.cc
@@ -1,4 +1,6 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+
// 2011-05-19 Paolo Carlini <paolo.carlini@oracle.com>
//
// Copyright (C) 2011-2013 Free Software Foundation, Inc.
@@ -19,56 +21,57 @@
// <http://www.gnu.org/licenses/>.
#include <type_traits>
-#include <testsuite_hooks.h>
#include <testsuite_tr1.h>
void test01()
{
- bool test __attribute__((unused)) = true;
using std::is_copy_assignable;
using namespace __gnu_test;
// Positive tests.
- VERIFY( (test_property<is_copy_assignable, int>(true)) );
- VERIFY( (test_property<is_copy_assignable, float>(true)) );
- VERIFY( (test_property<is_copy_assignable, EnumType>(true)) );
- VERIFY( (test_property<is_copy_assignable, int*>(true)) );
- VERIFY( (test_property<is_copy_assignable, int(*)(int)>(true)) );
- VERIFY( (test_property<is_copy_assignable, int (ClassType::*)>(true)) );
- VERIFY( (test_property<is_copy_assignable,
- int (ClassType::*) (int)>(true)) );
+ static_assert(test_property<is_copy_assignable, int>(true), "");
+ static_assert(test_property<is_copy_assignable, float>(true), "");
+ static_assert(test_property<is_copy_assignable, EnumType>(true), "");
+ static_assert(test_property<is_copy_assignable, int*>(true), "");
+ static_assert(test_property<is_copy_assignable, int(*)(int)>(true), "");
+ static_assert(test_property<is_copy_assignable,
+ int (ClassType::*)>(true), "");
+ static_assert(test_property<is_copy_assignable,
+ int (ClassType::*) (int)>(true), "");
- VERIFY( (test_property<is_copy_assignable, NoexceptCopyAssignClass>(true)) );
- VERIFY( (test_property<is_copy_assignable, ExceptCopyAssignClass>(true)) );
+ static_assert(test_property<is_copy_assignable,
+ NoexceptCopyAssignClass>(true), "");
+ static_assert(test_property<is_copy_assignable,
+ ExceptCopyAssignClass>(true), "");
// Negative tests.
- VERIFY( (test_property<is_copy_assignable, void>(false)) );
- VERIFY( (test_property<is_copy_assignable, int[2]>(false)) );
- VERIFY( (test_property<is_copy_assignable, float[][3]>(false)) );
- VERIFY( (test_property<is_copy_assignable, EnumType[2][3][4]>(false)) );
- VERIFY( (test_property<is_copy_assignable, int*[3]>(false)) );
- VERIFY( (test_property<is_copy_assignable, int(*[][2])(int)>(false)) );
- VERIFY( (test_property<is_copy_assignable,
- int (ClassType::*[2][3])>(false)) );
- VERIFY( (test_property<is_copy_assignable,
- int (ClassType::*[][2][3]) (int)>(false)) );
- VERIFY( (test_property<is_copy_assignable,
- ClassType(unsigned) const &>(false)) );
- VERIFY( (test_property<is_copy_assignable,
- bool(ClassType) const>(false)) );
- VERIFY( (test_property<is_copy_assignable,
- bool(...) &&>(false)) );
- VERIFY( (test_property<is_copy_assignable,
- EnumType(int, ...)>(false)) );
-
- VERIFY( (test_property<is_copy_assignable, NoexceptMoveAssignClass>(false)) );
- VERIFY( (test_property<is_copy_assignable, ExceptMoveAssignClass>(false)) );
- VERIFY( (test_property<is_copy_assignable, DeletedCopyAssignClass>(false)) );
- VERIFY( (test_property<is_copy_assignable, DeletedMoveAssignClass>(false)) );
-}
+ static_assert(test_property<is_copy_assignable, void>(false), "");
+ static_assert(test_property<is_copy_assignable, int[2]>(false), "");
+ static_assert(test_property<is_copy_assignable, float[][3]>(false), "");
+ static_assert(test_property<is_copy_assignable,
+ EnumType[2][3][4]>(false), "");
+ static_assert(test_property<is_copy_assignable, int*[3]>(false), "");
+ static_assert(test_property<is_copy_assignable,
+ int(*[][2])(int)>(false), "");
+ static_assert(test_property<is_copy_assignable,
+ int (ClassType::*[2][3])>(false), "");
+ static_assert(test_property<is_copy_assignable,
+ int (ClassType::*[][2][3]) (int)>(false), "");
+ static_assert(test_property<is_copy_assignable,
+ ClassType(unsigned) const &>(false), "");
+ static_assert(test_property<is_copy_assignable,
+ bool(ClassType) const>(false), "");
+ static_assert(test_property<is_copy_assignable,
+ bool(...) &&>(false), "");
+ static_assert(test_property<is_copy_assignable,
+ EnumType(int, ...)>(false), "");
-int main()
-{
- test01();
- return 0;
+ static_assert(test_property<is_copy_assignable,
+ NoexceptMoveAssignClass>(false), "");
+ static_assert(test_property<is_copy_assignable,
+ ExceptMoveAssignClass>(false), "");
+ static_assert(test_property<is_copy_assignable,
+ DeletedCopyAssignClass>(false), "");
+ static_assert(test_property<is_copy_assignable,
+ DeletedMoveAssignClass>(false), "");
}
diff --git a/libstdc++-v3/testsuite/20_util/is_copy_constructible/value.cc b/libstdc++-v3/testsuite/20_util/is_copy_constructible/value.cc
index 0a9686d67e1..d05c21243fc 100644
--- a/libstdc++-v3/testsuite/20_util/is_copy_constructible/value.cc
+++ b/libstdc++-v3/testsuite/20_util/is_copy_constructible/value.cc
@@ -1,4 +1,5 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
//
// Copyright (C) 2011-2013 Free Software Foundation, Inc.
//
@@ -18,64 +19,56 @@
// <http://www.gnu.org/licenses/>.
#include <type_traits>
-#include <testsuite_hooks.h>
#include <testsuite_tr1.h>
void test01()
{
- bool test __attribute__((unused)) = true;
using std::is_copy_constructible;
using namespace __gnu_test;
// Positive tests.
- VERIFY( (test_category<is_copy_constructible, int>(true)) );
- VERIFY( (test_category<is_copy_constructible, float>(true)) );
- VERIFY( (test_category<is_copy_constructible, EnumType>(true)) );
- VERIFY( (test_category<is_copy_constructible, int*>(true)) );
- VERIFY( (test_category<is_copy_constructible, int(*)(int)>(true)) );
- VERIFY( (test_category<is_copy_constructible,
- int (ClassType::*)>(true)) );
- VERIFY( (test_category<is_copy_constructible,
- int (ClassType::*) (int)>(true)) );
+ static_assert(test_category<is_copy_constructible, int>(true), "");
+ static_assert(test_category<is_copy_constructible, float>(true), "");
+ static_assert(test_category<is_copy_constructible, EnumType>(true), "");
+ static_assert(test_category<is_copy_constructible, int*>(true), "");
+ static_assert(test_category<is_copy_constructible, int(*)(int)>(true), "");
+ static_assert(test_category<is_copy_constructible,
+ int (ClassType::*)>(true), "");
+ static_assert(test_category<is_copy_constructible,
+ int (ClassType::*) (int)>(true), "");
- VERIFY( (test_property<is_copy_constructible,
- NoexceptCopyConsClass>(true)) );
- VERIFY( (test_property<is_copy_constructible,
- const NoexceptCopyConsClass>(true)) );
- VERIFY( (test_property<is_copy_constructible,
- ThrowCopyConsClass>(true)) );
- VERIFY( (test_property<is_copy_constructible,
- ExceptCopyConsClass>(true)) );
+ static_assert(test_property<is_copy_constructible,
+ NoexceptCopyConsClass>(true), "");
+ static_assert(test_property<is_copy_constructible,
+ const NoexceptCopyConsClass>(true), "");
+ static_assert(test_property<is_copy_constructible,
+ ThrowCopyConsClass>(true), "");
+ static_assert(test_property<is_copy_constructible,
+ ExceptCopyConsClass>(true), "");
// Negative tests.
- VERIFY( (test_category<is_copy_constructible, void>(false)) );
- VERIFY( (test_category<is_copy_constructible, int[2]>(false)) );
- VERIFY( (test_category<is_copy_constructible, int[]>(false)) );
- VERIFY( (test_category<is_copy_constructible, float[][3]>(false)) );
- VERIFY( (test_category<is_copy_constructible,
- EnumType[2][3][4]>(false)) );
- VERIFY( (test_category<is_copy_constructible, int*[3]>(false)) );
- VERIFY( (test_category<is_copy_constructible,
- int(*[][2])(int)>(false)) );
- VERIFY( (test_category<is_copy_constructible,
- int (ClassType::*[2][3])>(false)) );
- VERIFY( (test_category<is_copy_constructible,
- int (ClassType::*[][2][3]) (int)>(false)) );
- VERIFY( (test_category<is_copy_constructible,
- ClassType(unsigned) const &>(false)) );
- VERIFY( (test_category<is_copy_constructible,
- bool(ClassType) const>(false)) );
- VERIFY( (test_category<is_copy_constructible,
- bool(...) &&>(false)) );
- VERIFY( (test_category<is_copy_constructible,
- EnumType(int, ...)>(false)) );
+ static_assert(test_category<is_copy_constructible, void>(false), "");
+ static_assert(test_category<is_copy_constructible, int[2]>(false), "");
+ static_assert(test_category<is_copy_constructible, int[]>(false), "");
+ static_assert(test_category<is_copy_constructible, float[][3]>(false), "");
+ static_assert(test_category<is_copy_constructible,
+ EnumType[2][3][4]>(false), "");
+ static_assert(test_category<is_copy_constructible, int*[3]>(false), "");
+ static_assert(test_category<is_copy_constructible,
+ int(*[][2])(int)>(false), "");
+ static_assert(test_category<is_copy_constructible,
+ int (ClassType::*[2][3])>(false), "");
+ static_assert(test_category<is_copy_constructible,
+ int (ClassType::*[][2][3]) (int)>(false), "");
+ static_assert(test_category<is_copy_constructible,
+ ClassType(unsigned) const &>(false), "");
+ static_assert(test_category<is_copy_constructible,
+ bool(ClassType) const>(false), "");
+ static_assert(test_category<is_copy_constructible,
+ bool(...) &&>(false), "");
+ static_assert(test_category<is_copy_constructible,
+ EnumType(int, ...)>(false), "");
- VERIFY( (test_property<is_copy_constructible,
- volatile NoexceptCopyConsClass>(false)) );
-}
-
-int main()
-{
- test01();
- return 0;
+ static_assert(test_property<is_copy_constructible,
+ volatile NoexceptCopyConsClass>(false), "");
}
diff --git a/libstdc++-v3/testsuite/20_util/is_floating_point/value.cc b/libstdc++-v3/testsuite/20_util/is_floating_point/value.cc
index 104775c5ade..d77687edce1 100644
--- a/libstdc++-v3/testsuite/20_util/is_floating_point/value.cc
+++ b/libstdc++-v3/testsuite/20_util/is_floating_point/value.cc
@@ -1,4 +1,5 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
//
// Copyright (C) 2011-2013 Free Software Foundation, Inc.
//
@@ -18,51 +19,45 @@
// <http://www.gnu.org/licenses/>.
#include <type_traits>
-#include <testsuite_hooks.h>
#include <testsuite_tr1.h>
void test01()
{
- bool test __attribute__((unused)) = true;
using std::is_floating_point;
using namespace __gnu_test;
- VERIFY( (test_category<is_floating_point, void>(false)) );
- VERIFY( (test_category<is_floating_point, char>(false)) );
- VERIFY( (test_category<is_floating_point, signed char>(false)) );
- VERIFY( (test_category<is_floating_point, unsigned char>(false)) );
+ static_assert(test_category<is_floating_point, void>(false), "");
+ static_assert(test_category<is_floating_point, char>(false), "");
+ static_assert(test_category<is_floating_point, signed char>(false), "");
+ static_assert(test_category<is_floating_point, unsigned char>(false), "");
#ifdef _GLIBCXX_USE_WCHAR_T
- VERIFY( (test_category<is_floating_point, wchar_t>(false)) );
+ static_assert(test_category<is_floating_point, wchar_t>(false), "");
#endif
- VERIFY( (test_category<is_floating_point, short>(false)) );
- VERIFY( (test_category<is_floating_point, unsigned short>(false)) );
- VERIFY( (test_category<is_floating_point, int>(false)) );
- VERIFY( (test_category<is_floating_point, unsigned int>(false)) );
- VERIFY( (test_category<is_floating_point, long>(false)) );
- VERIFY( (test_category<is_floating_point, unsigned long>(false)) );
- VERIFY( (test_category<is_floating_point, long long>(false)) );
- VERIFY( (test_category<is_floating_point, unsigned long long>(false)) );
-
- VERIFY( (test_category<is_floating_point, float>(true)) );
- VERIFY( (test_category<is_floating_point, double>(true)) );
- VERIFY( (test_category<is_floating_point, long double>(true)) );
+ static_assert(test_category<is_floating_point, short>(false), "");
+ static_assert(test_category<is_floating_point, unsigned short>(false), "");
+ static_assert(test_category<is_floating_point, int>(false), "");
+ static_assert(test_category<is_floating_point, unsigned int>(false), "");
+ static_assert(test_category<is_floating_point, long>(false), "");
+ static_assert(test_category<is_floating_point, unsigned long>(false), "");
+ static_assert(test_category<is_floating_point, long long>(false), "");
+ static_assert(test_category<is_floating_point,
+ unsigned long long>(false), "");
+
+ static_assert(test_category<is_floating_point, float>(true), "");
+ static_assert(test_category<is_floating_point, double>(true), "");
+ static_assert(test_category<is_floating_point, long double>(true), "");
// GNU Extensions.
#ifdef _GLIBCXX_USE_FLOAT128
- VERIFY( (test_category<is_floating_point, __float128>(true)) );
+ static_assert(test_category<is_floating_point, __float128>(true), "");
#endif
#ifdef _GLIBCXX_USE_INT128
- VERIFY( (test_category<is_floating_point, __int128>(false)) );
- VERIFY( (test_category<is_floating_point, unsigned __int128>(false)) );
+ static_assert(test_category<is_floating_point, __int128>(false), "");
+ static_assert(test_category<is_floating_point,
+ unsigned __int128>(false), "");
#endif
// Sanity check.
- VERIFY( (test_category<is_floating_point, ClassType>(false)) );
-}
-
-int main()
-{
- test01();
- return 0;
+ static_assert(test_category<is_floating_point, ClassType>(false), "");
}
diff --git a/libstdc++-v3/testsuite/20_util/is_function/value.cc b/libstdc++-v3/testsuite/20_util/is_function/value.cc
index ce52ac9872d..c38a3a1e7a1 100644
--- a/libstdc++-v3/testsuite/20_util/is_function/value.cc
+++ b/libstdc++-v3/testsuite/20_util/is_function/value.cc
@@ -1,4 +1,5 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
//
// Copyright (C) 2011-2013 Free Software Foundation, Inc.
//
@@ -18,38 +19,32 @@
// <http://www.gnu.org/licenses/>.
#include <type_traits>
-#include <testsuite_hooks.h>
#include <testsuite_tr1.h>
void test01()
{
- bool test __attribute__((unused)) = true;
using std::is_function;
using namespace __gnu_test;
// Positive tests.
- VERIFY( (test_category<is_function, int (int)>(true)) );
- VERIFY( (test_category<is_function, ClassType (ClassType)>(true)) );
- VERIFY( (test_category<is_function, float (int, float, int[], int&)>(true)) );
- VERIFY( (test_category<is_function, int (int, ...)>(true)) );
- VERIFY( (test_category<is_function, bool (ClassType) const>(true)) );
- VERIFY( (test_category<is_function, ClassType () &>(true)) );
- VERIFY( (test_category<is_function, char (int, ClassType) const volatile &&>(true)) );
+ static_assert(test_category<is_function, int (int)>(true), "");
+ static_assert(test_category<is_function, ClassType (ClassType)>(true), "");
+ static_assert(test_category<is_function,
+ float (int, float, int[], int&)>(true), "");
+ static_assert(test_category<is_function, int (int, ...)>(true), "");
+ static_assert(test_category<is_function, bool (ClassType) const>(true), "");
+ static_assert(test_category<is_function, ClassType () &>(true), "");
+ static_assert(test_category<is_function,
+ char (int, ClassType) const volatile &&>(true), "");
// Negative tests.
- VERIFY( (test_category<is_function, int&>(false)) );
- VERIFY( (test_category<is_function, void>(false)) );
- VERIFY( (test_category<is_function, const void>(false)) );
+ static_assert(test_category<is_function, int&>(false), "");
+ static_assert(test_category<is_function, void>(false), "");
+ static_assert(test_category<is_function, const void>(false), "");
- VERIFY( (test_category<is_function, AbstractClass>(false)) );
- VERIFY( (test_category<is_function, int(&)(int)>(false)) );
+ static_assert(test_category<is_function, AbstractClass>(false), "");
+ static_assert(test_category<is_function, int(&)(int)>(false), "");
// Sanity check.
- VERIFY( (test_category<is_function, ClassType>(false)) );
-}
-
-int main()
-{
- test01();
- return 0;
+ static_assert(test_category<is_function, ClassType>(false), "");
}
diff --git a/libstdc++-v3/testsuite/20_util/is_fundamental/value.cc b/libstdc++-v3/testsuite/20_util/is_fundamental/value.cc
index 00fa8822d38..b6ba4d09c7e 100644
--- a/libstdc++-v3/testsuite/20_util/is_fundamental/value.cc
+++ b/libstdc++-v3/testsuite/20_util/is_fundamental/value.cc
@@ -1,4 +1,5 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
//
// Copyright (C) 2011-2013 Free Software Foundation, Inc.
//
@@ -18,43 +19,35 @@
// <http://www.gnu.org/licenses/>.
#include <type_traits>
-#include <testsuite_hooks.h>
#include <testsuite_tr1.h>
void test01()
{
- bool test __attribute__((unused)) = true;
using std::is_fundamental;
using namespace __gnu_test;
- VERIFY( (test_category<is_fundamental, void>(true)) );
- VERIFY( (test_category<is_fundamental, char>(true)) );
- VERIFY( (test_category<is_fundamental, signed char>(true)) );
- VERIFY( (test_category<is_fundamental, unsigned char>(true)) );
+ static_assert(test_category<is_fundamental, void>(true), "");
+ static_assert(test_category<is_fundamental, char>(true), "");
+ static_assert(test_category<is_fundamental, signed char>(true), "");
+ static_assert(test_category<is_fundamental, unsigned char>(true), "");
#ifdef _GLIBCXX_USE_WCHAR_T
- VERIFY( (test_category<is_fundamental, wchar_t>(true)) );
+ static_assert(test_category<is_fundamental, wchar_t>(true), "");
#endif
- VERIFY( (test_category<is_fundamental, short>(true)) );
- VERIFY( (test_category<is_fundamental, unsigned short>(true)) );
- VERIFY( (test_category<is_fundamental, int>(true)) );
- VERIFY( (test_category<is_fundamental, unsigned int>(true)) );
- VERIFY( (test_category<is_fundamental, long>(true)) );
- VERIFY( (test_category<is_fundamental, unsigned long>(true)) );
- VERIFY( (test_category<is_fundamental, long long>(true)) );
- VERIFY( (test_category<is_fundamental, unsigned long long>(true)) );
- VERIFY( (test_category<is_fundamental, float>(true)) );
- VERIFY( (test_category<is_fundamental, double>(true)) );
- VERIFY( (test_category<is_fundamental, long double>(true)) );
+ static_assert(test_category<is_fundamental, short>(true), "");
+ static_assert(test_category<is_fundamental, unsigned short>(true), "");
+ static_assert(test_category<is_fundamental, int>(true), "");
+ static_assert(test_category<is_fundamental, unsigned int>(true), "");
+ static_assert(test_category<is_fundamental, long>(true), "");
+ static_assert(test_category<is_fundamental, unsigned long>(true), "");
+ static_assert(test_category<is_fundamental, long long>(true), "");
+ static_assert(test_category<is_fundamental, unsigned long long>(true), "");
+ static_assert(test_category<is_fundamental, float>(true), "");
+ static_assert(test_category<is_fundamental, double>(true), "");
+ static_assert(test_category<is_fundamental, long double>(true), "");
// libstdc++/56609
- VERIFY( (test_category<is_fundamental, std::nullptr_t>(true)) );
+ static_assert(test_category<is_fundamental, std::nullptr_t>(true), "");
// Sanity check.
- VERIFY( (test_category<is_fundamental, ClassType>(false)) );
-}
-
-int main()
-{
- test01();
- return 0;
+ static_assert(test_category<is_fundamental, ClassType>(false), "");
}
diff --git a/libstdc++-v3/testsuite/20_util/is_integral/value.cc b/libstdc++-v3/testsuite/20_util/is_integral/value.cc
index ff919d48c95..0ebc91b8d05 100644
--- a/libstdc++-v3/testsuite/20_util/is_integral/value.cc
+++ b/libstdc++-v3/testsuite/20_util/is_integral/value.cc
@@ -1,4 +1,6 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+
// 2008-05-20 Paolo Carlini <paolo.carlini@oracle.com>
//
// Copyright (C) 2008-2013 Free Software Foundation, Inc.
@@ -19,54 +21,46 @@
// <http://www.gnu.org/licenses/>.
#include <type_traits>
-#include <testsuite_hooks.h>
#include <testsuite_tr1.h>
void test01()
{
- bool test __attribute__((unused)) = true;
using std::is_integral;
using namespace __gnu_test;
+
+ static_assert(test_category<is_integral, void>(false), "");
- VERIFY( (test_category<is_integral, void>(false)) );
-
- VERIFY( (test_category<is_integral, char>(true)) );
- VERIFY( (test_category<is_integral, signed char>(true)) );
- VERIFY( (test_category<is_integral, unsigned char>(true)) );
+ static_assert(test_category<is_integral, char>(true), "");
+ static_assert(test_category<is_integral, signed char>(true), "");
+ static_assert(test_category<is_integral, unsigned char>(true), "");
#ifdef _GLIBCXX_USE_WCHAR_T
- VERIFY( (test_category<is_integral, wchar_t>(true)) );
+ static_assert(test_category<is_integral, wchar_t>(true), "");
#endif
- VERIFY( (test_category<is_integral, char16_t>(true)) );
- VERIFY( (test_category<is_integral, char32_t>(true)) );
- VERIFY( (test_category<is_integral, short>(true)) );
- VERIFY( (test_category<is_integral, unsigned short>(true)) );
- VERIFY( (test_category<is_integral, int>(true)) );
- VERIFY( (test_category<is_integral, unsigned int>(true)) );
- VERIFY( (test_category<is_integral, long>(true)) );
- VERIFY( (test_category<is_integral, unsigned long>(true)) );
- VERIFY( (test_category<is_integral, long long>(true)) );
- VERIFY( (test_category<is_integral, unsigned long long>(true)) );
+ static_assert(test_category<is_integral, char16_t>(true), "");
+ static_assert(test_category<is_integral, char32_t>(true), "");
+ static_assert(test_category<is_integral, short>(true), "");
+ static_assert(test_category<is_integral, unsigned short>(true), "");
+ static_assert(test_category<is_integral, int>(true), "");
+ static_assert(test_category<is_integral, unsigned int>(true), "");
+ static_assert(test_category<is_integral, long>(true), "");
+ static_assert(test_category<is_integral, unsigned long>(true), "");
+ static_assert(test_category<is_integral, long long>(true), "");
+ static_assert(test_category<is_integral, unsigned long long>(true), "");
- VERIFY( (test_category<is_integral, float>(false)) );
- VERIFY( (test_category<is_integral, double>(false)) );
- VERIFY( (test_category<is_integral, long double>(false)) );
+ static_assert(test_category<is_integral, float>(false), "");
+ static_assert(test_category<is_integral, double>(false), "");
+ static_assert(test_category<is_integral, long double>(false), "");
// GNU Extensions.
#ifdef _GLIBCXX_USE_INT128
- VERIFY( (test_category<is_integral, __int128>(true)) );
- VERIFY( (test_category<is_integral, unsigned __int128>(true)) );
+ static_assert(test_category<is_integral, __int128>(true), "");
+ static_assert(test_category<is_integral, unsigned __int128>(true), "");
#endif
#ifdef _GLIBCXX_USE_FLOAT128
- VERIFY( (test_category<is_integral, __float128>(false)) );
+ static_assert(test_category<is_integral, __float128>(false), "");
#endif
// Sanity check.
- VERIFY( (test_category<is_integral, ClassType>(false)) );
-}
-
-int main()
-{
- test01();
- return 0;
+ static_assert(test_category<is_integral, ClassType>(false), "");
}
diff --git a/libstdc++-v3/testsuite/20_util/is_literal_type/value.cc b/libstdc++-v3/testsuite/20_util/is_literal_type/value.cc
index 067ff766f68..703707c3b2b 100644
--- a/libstdc++-v3/testsuite/20_util/is_literal_type/value.cc
+++ b/libstdc++-v3/testsuite/20_util/is_literal_type/value.cc
@@ -1,4 +1,6 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+
// 2010-03-23 Paolo Carlini <paolo.carlini@oracle.com>
//
// Copyright (C) 2010-2013 Free Software Foundation, Inc.
@@ -19,36 +21,28 @@
// <http://www.gnu.org/licenses/>.
#include <type_traits>
-#include <testsuite_hooks.h>
#include <testsuite_tr1.h>
void test01()
{
- bool test __attribute__((unused)) = true;
using std::is_literal_type;
using namespace __gnu_test;
- VERIFY( (test_category<is_literal_type, int>(true)) );
- VERIFY( (test_category<is_literal_type, unsigned char>(true)) );
-
- VERIFY( (test_category<is_literal_type, TType>(true)) );
- VERIFY( (test_category<is_literal_type, PODType>(true)) );
+ static_assert(test_category<is_literal_type, int>(true), "");
+ static_assert(test_category<is_literal_type, unsigned char>(true), "");
- VERIFY( (test_category<is_literal_type, NType>(false)) );
- VERIFY( (test_category<is_literal_type, SLType>(false)) );
+ static_assert(test_category<is_literal_type, TType>(true), "");
+ static_assert(test_category<is_literal_type, PODType>(true), "");
- VERIFY( (test_category<is_literal_type, LType>(true)) );
- VERIFY( (test_category<is_literal_type, LType[5]>(true)) );
+ static_assert(test_category<is_literal_type, NType>(false), "");
+ static_assert(test_category<is_literal_type, SLType>(false), "");
- VERIFY( (test_category<is_literal_type, NLType>(false)) );
- VERIFY( (test_category<is_literal_type, NLType[5]>(false)) );
+ static_assert(test_category<is_literal_type, LType>(true), "");
+ static_assert(test_category<is_literal_type, LType[5]>(true), "");
- VERIFY( (test_category<is_literal_type, LTypeDerived>(true)) );
- VERIFY( (test_category<is_literal_type, LTypeDerived[5]>(true)) );
-}
+ static_assert(test_category<is_literal_type, NLType>(false), "");
+ static_assert(test_category<is_literal_type, NLType[5]>(false), "");
-int main()
-{
- test01();
- return 0;
+ static_assert(test_category<is_literal_type, LTypeDerived>(true), "");
+ static_assert(test_category<is_literal_type, LTypeDerived[5]>(true), "");
}
diff --git a/libstdc++-v3/testsuite/20_util/is_lvalue_reference/value.cc b/libstdc++-v3/testsuite/20_util/is_lvalue_reference/value.cc
index 6b117d81d1f..d084fd97323 100644
--- a/libstdc++-v3/testsuite/20_util/is_lvalue_reference/value.cc
+++ b/libstdc++-v3/testsuite/20_util/is_lvalue_reference/value.cc
@@ -1,4 +1,6 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+
// 2007-06-02 Paolo Carlini <pcarlini@suse.de>
//
// Copyright (C) 2007-2013 Free Software Foundation, Inc.
@@ -19,26 +21,19 @@
// <http://www.gnu.org/licenses/>.
#include <type_traits>
-#include <testsuite_hooks.h>
#include <testsuite_tr1.h>
void test01()
{
- bool test __attribute__((unused)) = true;
using std::is_lvalue_reference;
using namespace __gnu_test;
- VERIFY( (test_category<is_lvalue_reference, int&>(true)) );
- VERIFY( (test_category<is_lvalue_reference, ClassType&>(true)) );
- VERIFY( (test_category<is_lvalue_reference, int(&)(int)>(true)) );
+ static_assert(test_category<is_lvalue_reference, int&>(true), "");
+ static_assert(test_category<is_lvalue_reference, ClassType&>(true), "");
+ static_assert(test_category<is_lvalue_reference, int(&)(int)>(true), "");
// Sanity check.
- VERIFY( (test_category<is_lvalue_reference, int&&>(false)) );
- VERIFY( (test_category<is_lvalue_reference, ClassType>(false)) );
+ static_assert(test_category<is_lvalue_reference, int&&>(false), "");
+ static_assert(test_category<is_lvalue_reference, ClassType>(false), "");
}
-int main()
-{
- test01();
- return 0;
-}
diff --git a/libstdc++-v3/testsuite/20_util/is_member_function_pointer/value.cc b/libstdc++-v3/testsuite/20_util/is_member_function_pointer/value.cc
index 36d2abbaebf..78da4749dfb 100644
--- a/libstdc++-v3/testsuite/20_util/is_member_function_pointer/value.cc
+++ b/libstdc++-v3/testsuite/20_util/is_member_function_pointer/value.cc
@@ -1,4 +1,5 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
// Copyright (C) 2011-2013 Free Software Foundation, Inc.
//
@@ -18,41 +19,34 @@
// <http://www.gnu.org/licenses/>.
#include <type_traits>
-#include <testsuite_hooks.h>
#include <testsuite_tr1.h>
void test01()
{
- bool test __attribute__((unused)) = true;
using std::is_member_function_pointer;
using namespace __gnu_test;
// Positive tests.
- VERIFY( (test_category<is_member_function_pointer,
- int (ClassType::*) (int)>(true)) );
- VERIFY( (test_category<is_member_function_pointer,
- int (ClassType::*) (int) const>(true)) );
- VERIFY( (test_category<is_member_function_pointer,
- int (ClassType::*) (float, ...)>(true)) );
- VERIFY( (test_category<is_member_function_pointer,
- ClassType (ClassType::*) (ClassType)>(true)) );
- VERIFY( (test_category<is_member_function_pointer,
- float (ClassType::*) (int, float, int[], int&)>(true)) );
+ static_assert(test_category<is_member_function_pointer,
+ int (ClassType::*) (int)>(true), "");
+ static_assert(test_category<is_member_function_pointer,
+ int (ClassType::*) (int) const>(true), "");
+ static_assert(test_category<is_member_function_pointer,
+ int (ClassType::*) (float, ...)>(true), "");
+ static_assert(test_category<is_member_function_pointer,
+ ClassType (ClassType::*) (ClassType)>(true), "");
+ static_assert(test_category<is_member_function_pointer,
+ float (ClassType::*) (int, float, int[], int&)>(true), "");
// Negative tests.
- VERIFY( (test_category<is_member_function_pointer,
- int (ClassType::*)>(false)) );
- VERIFY( (test_category<is_member_function_pointer,
- const int (ClassType::*)>(false)) );
- VERIFY( (test_category<is_member_function_pointer,
- ClassType (ClassType::*)>(false)) );
+ static_assert(test_category<is_member_function_pointer,
+ int (ClassType::*)>(false), "");
+ static_assert(test_category<is_member_function_pointer,
+ const int (ClassType::*)>(false), "");
+ static_assert(test_category<is_member_function_pointer,
+ ClassType (ClassType::*)>(false), "");
// Sanity check.
- VERIFY( (test_category<is_member_function_pointer, ClassType>(false)) );
-}
-
-int main()
-{
- test01();
- return 0;
+ static_assert(test_category<is_member_function_pointer,
+ ClassType>(false), "");
}
diff --git a/libstdc++-v3/testsuite/20_util/is_member_object_pointer/value.cc b/libstdc++-v3/testsuite/20_util/is_member_object_pointer/value.cc
index e451c1b094d..88eb561aa93 100644
--- a/libstdc++-v3/testsuite/20_util/is_member_object_pointer/value.cc
+++ b/libstdc++-v3/testsuite/20_util/is_member_object_pointer/value.cc
@@ -1,4 +1,5 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
// Copyright (C) 2011-2013 Free Software Foundation, Inc.
//
@@ -18,37 +19,35 @@
// <http://www.gnu.org/licenses/>.
#include <type_traits>
-#include <testsuite_hooks.h>
#include <testsuite_tr1.h>
void test01()
{
- bool test __attribute__((unused)) = true;
using std::is_member_object_pointer;
using namespace __gnu_test;
// Positive tests.
- VERIFY( (test_category<is_member_object_pointer,
- int (ClassType::*)>(true)) );
- VERIFY( (test_category<is_member_object_pointer,
- const int (ClassType::*)>(true)) );
- VERIFY( (test_category<is_member_object_pointer,
- ClassType (ClassType::*)>(true)) );
+ static_assert(test_category<is_member_object_pointer,
+ int (ClassType::*)>(true), "");
+ static_assert(test_category<is_member_object_pointer,
+ const int (ClassType::*)>(true), "");
+ static_assert(test_category<is_member_object_pointer,
+ ClassType (ClassType::*)>(true), "");
// Negative tests.
- VERIFY( (test_category<is_member_object_pointer,
- int (ClassType::*) (int)>(false)) );
- VERIFY( (test_category<is_member_object_pointer,
- int (ClassType::*) (int) const>(false)) );
- VERIFY( (test_category<is_member_object_pointer,
- int (ClassType::*) (float, ...)>(false)) );
- VERIFY( (test_category<is_member_object_pointer,
- ClassType (ClassType::*) (ClassType)>(false)) );
- VERIFY( (test_category<is_member_object_pointer,
- float (ClassType::*) (int, float, int[], int&)>(false)) );
+ static_assert(test_category<is_member_object_pointer,
+ int (ClassType::*) (int)>(false), "");
+ static_assert(test_category<is_member_object_pointer,
+ int (ClassType::*) (int) const>(false), "");
+ static_assert(test_category<is_member_object_pointer,
+ int (ClassType::*) (float, ...)>(false), "");
+ static_assert(test_category<is_member_object_pointer,
+ ClassType (ClassType::*) (ClassType)>(false), "");
+ static_assert(test_category<is_member_object_pointer,
+ float (ClassType::*) (int, float, int[], int&)>(false), "");
// Sanity check.
- VERIFY( (test_category<is_member_object_pointer, ClassType>(false)) );
+ static_assert(test_category<is_member_object_pointer, ClassType>(false), "");
}
int main()
diff --git a/libstdc++-v3/testsuite/20_util/is_member_pointer/value.cc b/libstdc++-v3/testsuite/20_util/is_member_pointer/value.cc
index 3adc1d494b4..c74c9820d28 100644
--- a/libstdc++-v3/testsuite/20_util/is_member_pointer/value.cc
+++ b/libstdc++-v3/testsuite/20_util/is_member_pointer/value.cc
@@ -1,4 +1,5 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
// Copyright (C) 2011-2013 Free Software Foundation, Inc.
//
@@ -18,36 +19,30 @@
// <http://www.gnu.org/licenses/>.
#include <type_traits>
-#include <testsuite_hooks.h>
#include <testsuite_tr1.h>
void test01()
{
- bool test __attribute__((unused)) = true;
using std::is_member_pointer;
using namespace __gnu_test;
- VERIFY( (test_category<is_member_pointer, int (ClassType::*)>(true)) );
- VERIFY( (test_category<is_member_pointer, const int (ClassType::*)>(true)) );
- VERIFY( (test_category<is_member_pointer, ClassType (ClassType::*)>(true)) );
+ static_assert(test_category<is_member_pointer, int (ClassType::*)>(true), "");
+ static_assert(test_category<is_member_pointer,
+ const int (ClassType::*)>(true), "");
+ static_assert(test_category<is_member_pointer,
+ ClassType (ClassType::*)>(true), "");
- VERIFY( (test_category<is_member_pointer,
- int (ClassType::*) (int)>(true)) );
- VERIFY( (test_category<is_member_pointer,
- int (ClassType::*) (int) const>(true)) );
- VERIFY( (test_category<is_member_pointer,
- int (ClassType::*) (float, ...)>(true)) );
- VERIFY( (test_category<is_member_pointer,
- ClassType (ClassType::*) (ClassType)>(true)) );
- VERIFY( (test_category<is_member_pointer,
- float (ClassType::*) (int, float, int[], int&)>(true)) );
+ static_assert(test_category<is_member_pointer,
+ int (ClassType::*) (int)>(true), "");
+ static_assert(test_category<is_member_pointer,
+ int (ClassType::*) (int) const>(true), "");
+ static_assert(test_category<is_member_pointer,
+ int (ClassType::*) (float, ...)>(true), "");
+ static_assert(test_category<is_member_pointer,
+ ClassType (ClassType::*) (ClassType)>(true), "");
+ static_assert(test_category<is_member_pointer,
+ float (ClassType::*) (int, float, int[], int&)>(true), "");
// Sanity check.
- VERIFY( (test_category<is_member_pointer, ClassType>(false)) );
-}
-
-int main()
-{
- test01();
- return 0;
+ static_assert(test_category<is_member_pointer, ClassType>(false), "");
}
diff --git a/libstdc++-v3/testsuite/20_util/is_move_assignable/value.cc b/libstdc++-v3/testsuite/20_util/is_move_assignable/value.cc
index c96f739a635..bd7699af167 100644
--- a/libstdc++-v3/testsuite/20_util/is_move_assignable/value.cc
+++ b/libstdc++-v3/testsuite/20_util/is_move_assignable/value.cc
@@ -1,4 +1,6 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+
// 2011-05-19 Paolo Carlini <paolo.carlini@oracle.com>
//
// Copyright (C) 2011-2013 Free Software Foundation, Inc.
@@ -19,56 +21,56 @@
// <http://www.gnu.org/licenses/>.
#include <type_traits>
-#include <testsuite_hooks.h>
#include <testsuite_tr1.h>
void test01()
{
- bool test __attribute__((unused)) = true;
using std::is_move_assignable;
using namespace __gnu_test;
// Positive tests.
- VERIFY( (test_property<is_move_assignable, int>(true)) );
- VERIFY( (test_property<is_move_assignable, float>(true)) );
- VERIFY( (test_property<is_move_assignable, EnumType>(true)) );
- VERIFY( (test_property<is_move_assignable, int*>(true)) );
- VERIFY( (test_property<is_move_assignable, int(*)(int)>(true)) );
- VERIFY( (test_property<is_move_assignable, int (ClassType::*)>(true)) );
- VERIFY( (test_property<is_move_assignable,
- int (ClassType::*) (int)>(true)) );
+ static_assert(test_property<is_move_assignable, int>(true), "");
+ static_assert(test_property<is_move_assignable, float>(true), "");
+ static_assert(test_property<is_move_assignable, EnumType>(true), "");
+ static_assert(test_property<is_move_assignable, int*>(true), "");
+ static_assert(test_property<is_move_assignable, int(*)(int)>(true), "");
+ static_assert(test_property<is_move_assignable,
+ int (ClassType::*)>(true), "");
+ static_assert(test_property<is_move_assignable,
+ int (ClassType::*) (int)>(true), "");
- VERIFY( (test_property<is_move_assignable, NoexceptMoveAssignClass>(true)) );
- VERIFY( (test_property<is_move_assignable, ExceptMoveAssignClass>(true)) );
- VERIFY( (test_property<is_move_assignable, NoexceptCopyAssignClass>(true)) );
- VERIFY( (test_property<is_move_assignable, ExceptCopyAssignClass>(true)) );
+ static_assert(test_property<is_move_assignable,
+ NoexceptMoveAssignClass>(true), "");
+ static_assert(test_property<is_move_assignable,
+ ExceptMoveAssignClass>(true), "");
+ static_assert(test_property<is_move_assignable,
+ NoexceptCopyAssignClass>(true), "");
+ static_assert(test_property<is_move_assignable,
+ ExceptCopyAssignClass>(true), "");
// Negative tests.
- VERIFY( (test_property<is_move_assignable, void>(false)) );
- VERIFY( (test_property<is_move_assignable, int[2]>(false)) );
- VERIFY( (test_property<is_move_assignable, float[][3]>(false)) );
- VERIFY( (test_property<is_move_assignable, EnumType[2][3][4]>(false)) );
- VERIFY( (test_property<is_move_assignable, int*[3]>(false)) );
- VERIFY( (test_property<is_move_assignable, int(*[][2])(int)>(false)) );
- VERIFY( (test_property<is_move_assignable,
- int (ClassType::*[2][3])>(false)) );
- VERIFY( (test_property<is_move_assignable,
- int (ClassType::*[][2][3]) (int)>(false)) );
- VERIFY( (test_property<is_move_assignable,
- ClassType(unsigned) const &>(false)) );
- VERIFY( (test_property<is_move_assignable,
- bool(ClassType) const>(false)) );
- VERIFY( (test_property<is_move_assignable,
- bool(...) &&>(false)) );
- VERIFY( (test_property<is_move_assignable,
- EnumType(int, ...)>(false)) );
-
- VERIFY( (test_property<is_move_assignable, DeletedCopyAssignClass>(false)) );
- VERIFY( (test_property<is_move_assignable, DeletedMoveAssignClass>(false)) );
-}
+ static_assert(test_property<is_move_assignable, void>(false), "");
+ static_assert(test_property<is_move_assignable, int[2]>(false), "");
+ static_assert(test_property<is_move_assignable, float[][3]>(false), "");
+ static_assert(test_property<is_move_assignable,
+ EnumType[2][3][4]>(false), "");
+ static_assert(test_property<is_move_assignable, int*[3]>(false), "");
+ static_assert(test_property<is_move_assignable, int(*[][2])(int)>(false), "");
+ static_assert(test_property<is_move_assignable,
+ int (ClassType::*[2][3])>(false), "");
+ static_assert(test_property<is_move_assignable,
+ int (ClassType::*[][2][3]) (int)>(false), "");
+ static_assert(test_property<is_move_assignable,
+ ClassType(unsigned) const &>(false), "");
+ static_assert(test_property<is_move_assignable,
+ bool(ClassType) const>(false), "");
+ static_assert(test_property<is_move_assignable,
+ bool(...) &&>(false), "");
+ static_assert(test_property<is_move_assignable,
+ EnumType(int, ...)>(false), "");
-int main()
-{
- test01();
- return 0;
+ static_assert(test_property<is_move_assignable,
+ DeletedCopyAssignClass>(false), "");
+ static_assert(test_property<is_move_assignable,
+ DeletedMoveAssignClass>(false), "");
}
diff --git a/libstdc++-v3/testsuite/20_util/is_move_constructible/value.cc b/libstdc++-v3/testsuite/20_util/is_move_constructible/value.cc
index 94af3e1ba14..b483eb029a3 100644
--- a/libstdc++-v3/testsuite/20_util/is_move_constructible/value.cc
+++ b/libstdc++-v3/testsuite/20_util/is_move_constructible/value.cc
@@ -1,4 +1,5 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
//
// Copyright (C) 2011-2013 Free Software Foundation, Inc.
//
@@ -18,64 +19,56 @@
// <http://www.gnu.org/licenses/>.
#include <type_traits>
-#include <testsuite_hooks.h>
#include <testsuite_tr1.h>
void test01()
{
- bool test __attribute__((unused)) = true;
using std::is_move_constructible;
using namespace __gnu_test;
// Positive tests.
- VERIFY( (test_category<is_move_constructible, int>(true)) );
- VERIFY( (test_category<is_move_constructible, float>(true)) );
- VERIFY( (test_category<is_move_constructible, EnumType>(true)) );
- VERIFY( (test_category<is_move_constructible, int*>(true)) );
- VERIFY( (test_category<is_move_constructible, int(*)(int)>(true)) );
- VERIFY( (test_category<is_move_constructible,
- int (ClassType::*)>(true)) );
- VERIFY( (test_category<is_move_constructible,
- int (ClassType::*) (int)>(true)) );
+ static_assert(test_category<is_move_constructible, int>(true), "");
+ static_assert(test_category<is_move_constructible, float>(true), "");
+ static_assert(test_category<is_move_constructible, EnumType>(true), "");
+ static_assert(test_category<is_move_constructible, int*>(true), "");
+ static_assert(test_category<is_move_constructible, int(*)(int)>(true), "");
+ static_assert(test_category<is_move_constructible,
+ int (ClassType::*)>(true), "");
+ static_assert(test_category<is_move_constructible,
+ int (ClassType::*) (int)>(true), "");
- VERIFY( (test_property<is_move_constructible,
- NoexceptMoveConsClass>(true)) );
- VERIFY( (test_property<is_move_constructible,
- ThrowMoveConsClass>(true)) );
- VERIFY( (test_property<is_move_constructible,
- ExceptMoveConsClass>(true)) );
+ static_assert(test_property<is_move_constructible,
+ NoexceptMoveConsClass>(true), "");
+ static_assert(test_property<is_move_constructible,
+ ThrowMoveConsClass>(true), "");
+ static_assert(test_property<is_move_constructible,
+ ExceptMoveConsClass>(true), "");
// Negative tests.
- VERIFY( (test_category<is_move_constructible, void>(false)) );
- VERIFY( (test_category<is_move_constructible, int[2]>(false)) );
- VERIFY( (test_category<is_move_constructible, int[]>(false)) );
- VERIFY( (test_category<is_move_constructible, float[][3]>(false)) );
- VERIFY( (test_category<is_move_constructible,
- EnumType[2][3][4]>(false)) );
- VERIFY( (test_category<is_move_constructible, int*[3]>(false)) );
- VERIFY( (test_category<is_move_constructible,
- int(*[][2])(int)>(false)) );
- VERIFY( (test_category<is_move_constructible,
- int (ClassType::*[2][3])>(false)) );
- VERIFY( (test_category<is_move_constructible,
- int (ClassType::*[][2][3]) (int)>(false)) );
- VERIFY( (test_category<is_move_constructible,
- ClassType(unsigned) const &>(false)) );
- VERIFY( (test_category<is_move_constructible,
- bool(ClassType) const>(false)) );
- VERIFY( (test_category<is_move_constructible,
- bool(...) &&>(false)) );
- VERIFY( (test_category<is_move_constructible,
- EnumType(int, ...)>(false)) );
+ static_assert(test_category<is_move_constructible, void>(false), "");
+ static_assert(test_category<is_move_constructible, int[2]>(false), "");
+ static_assert(test_category<is_move_constructible, int[]>(false), "");
+ static_assert(test_category<is_move_constructible, float[][3]>(false), "");
+ static_assert(test_category<is_move_constructible,
+ EnumType[2][3][4]>(false), "");
+ static_assert(test_category<is_move_constructible, int*[3]>(false), "");
+ static_assert(test_category<is_move_constructible,
+ int(*[][2])(int)>(false), "");
+ static_assert(test_category<is_move_constructible,
+ int (ClassType::*[2][3])>(false), "");
+ static_assert(test_category<is_move_constructible,
+ int (ClassType::*[][2][3]) (int)>(false), "");
+ static_assert(test_category<is_move_constructible,
+ ClassType(unsigned) const &>(false), "");
+ static_assert(test_category<is_move_constructible,
+ bool(ClassType) const>(false), "");
+ static_assert(test_category<is_move_constructible,
+ bool(...) &&>(false), "");
+ static_assert(test_category<is_move_constructible,
+ EnumType(int, ...)>(false), "");
- VERIFY( (test_property<is_move_constructible,
- const NoexceptMoveConsClass>(false)) );
- VERIFY( (test_property<is_move_constructible,
- volatile NoexceptMoveConsClass>(false)) );
-}
-
-int main()
-{
- test01();
- return 0;
+ static_assert(test_property<is_move_constructible,
+ const NoexceptMoveConsClass>(false), "");
+ static_assert(test_property<is_move_constructible,
+ volatile NoexceptMoveConsClass>(false), "");
}
diff --git a/libstdc++-v3/testsuite/20_util/is_nothrow_assignable/value.cc b/libstdc++-v3/testsuite/20_util/is_nothrow_assignable/value.cc
index 1ea87e71dff..ae4b4e049d4 100644
--- a/libstdc++-v3/testsuite/20_util/is_nothrow_assignable/value.cc
+++ b/libstdc++-v3/testsuite/20_util/is_nothrow_assignable/value.cc
@@ -1,4 +1,6 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+
// 2011-05-19 Paolo Carlini <paolo.carlini@oracle.com>
//
// Copyright (C) 2011-2013 Free Software Foundation, Inc.
@@ -19,40 +21,37 @@
// <http://www.gnu.org/licenses/>.
#include <type_traits>
-#include <testsuite_hooks.h>
#include <testsuite_tr1.h>
void test01()
{
- bool test __attribute__((unused)) = true;
using std::is_nothrow_assignable;
using namespace __gnu_test;
// Positive tests.
- VERIFY( (test_relationship<is_nothrow_assignable, int&, int>(true)) );
- VERIFY( (test_relationship<is_nothrow_assignable, int&, const int>(true)) );
+ static_assert(test_relationship<is_nothrow_assignable, int&, int>(true), "");
+ static_assert(test_relationship<is_nothrow_assignable, int&,
+ const int>(true), "");
- VERIFY( (test_relationship<is_nothrow_assignable,
- NoexceptCopyAssignClass&, const NoexceptCopyAssignClass&>(true)) );
- VERIFY( (test_relationship<is_nothrow_assignable,
- NoexceptMoveAssignClass&, NoexceptMoveAssignClass&&>(true)) );
- VERIFY( (test_relationship<is_nothrow_assignable,
- NoexceptCopyAssignClass&, NoexceptCopyAssignClass&&>(true)) );
+ static_assert(test_relationship<is_nothrow_assignable,
+ NoexceptCopyAssignClass&,
+ const NoexceptCopyAssignClass&>(true), "");
+ static_assert(test_relationship<is_nothrow_assignable,
+ NoexceptMoveAssignClass&, NoexceptMoveAssignClass&&>(true), "");
+ static_assert(test_relationship<is_nothrow_assignable,
+ NoexceptCopyAssignClass&, NoexceptCopyAssignClass&&>(true), "");
// Negative tests.
- VERIFY( (test_relationship<is_nothrow_assignable, int, int>(false)) );
- VERIFY( (test_relationship<is_nothrow_assignable, int, const int>(false)) );
-
- VERIFY( (test_relationship<is_nothrow_assignable,
- ExceptCopyAssignClass&, const ExceptCopyAssignClass&>(false)) );
- VERIFY( (test_relationship<is_nothrow_assignable,
- ExceptMoveAssignClass&, ExceptMoveAssignClass&&>(false)) );
- VERIFY( (test_relationship<is_nothrow_assignable,
- NoexceptMoveAssignClass&, const NoexceptMoveAssignClass&>(false)) );
-}
+ static_assert(test_relationship<is_nothrow_assignable, int, int>(false), "");
+ static_assert(test_relationship<is_nothrow_assignable, int,
+ const int>(false), "");
-int main()
-{
- test01();
- return 0;
+ static_assert(test_relationship<is_nothrow_assignable,
+ ExceptCopyAssignClass&,
+ const ExceptCopyAssignClass&>(false), "");
+ static_assert(test_relationship<is_nothrow_assignable,
+ ExceptMoveAssignClass&, ExceptMoveAssignClass&&>(false), "");
+ static_assert(test_relationship<is_nothrow_assignable,
+ NoexceptMoveAssignClass&,
+ const NoexceptMoveAssignClass&>(false), "");
}
diff --git a/libstdc++-v3/testsuite/20_util/is_nothrow_constructible/value.cc b/libstdc++-v3/testsuite/20_util/is_nothrow_constructible/value.cc
index 0488ae37f5a..f5fdddf4c9f 100644
--- a/libstdc++-v3/testsuite/20_util/is_nothrow_constructible/value.cc
+++ b/libstdc++-v3/testsuite/20_util/is_nothrow_constructible/value.cc
@@ -1,4 +1,5 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
// 2010-06-09 Paolo Carlini <paolo.carlini@oracle.com>
@@ -20,63 +21,55 @@
// <http://www.gnu.org/licenses/>.
#include <type_traits>
-#include <testsuite_hooks.h>
#include <testsuite_tr1.h>
void test01()
{
- bool test __attribute__((unused)) = true;
using std::is_nothrow_constructible;
using namespace __gnu_test;
// Positive tests.
- VERIFY( (test_property<is_nothrow_constructible, NoexceptExplicitClass,
- double&>(true)) );
- VERIFY( (test_property<is_nothrow_constructible, NoexceptExplicitClass,
- int&>(true)) );
- VERIFY( (test_property<is_nothrow_constructible, NoexceptExplicitClass,
- double&, int&, double&>(true)) );
- VERIFY( (test_property<is_nothrow_constructible, NothrowExplicitClass,
- double&>(true)) );
- VERIFY( (test_property<is_nothrow_constructible, NothrowExplicitClass,
- int&>(true)) );
- VERIFY( (test_property<is_nothrow_constructible, NothrowExplicitClass,
- double&, int&, double&>(true)) );
+ static_assert(test_property<is_nothrow_constructible, NoexceptExplicitClass,
+ double&>(true), "");
+ static_assert(test_property<is_nothrow_constructible, NoexceptExplicitClass,
+ int&>(true), "");
+ static_assert(test_property<is_nothrow_constructible, NoexceptExplicitClass,
+ double&, int&, double&>(true), "");
+ static_assert(test_property<is_nothrow_constructible, NothrowExplicitClass,
+ double&>(true), "");
+ static_assert(test_property<is_nothrow_constructible, NothrowExplicitClass,
+ int&>(true), "");
+ static_assert(test_property<is_nothrow_constructible, NothrowExplicitClass,
+ double&, int&, double&>(true), "");
- VERIFY( (test_property<is_nothrow_constructible, int[1]>(true)) );
+ static_assert(test_property<is_nothrow_constructible, int[1]>(true), "");
// Negative tests.
- VERIFY( (test_property<is_nothrow_constructible, NoexceptExplicitClass,
- void*>(false)) );
- VERIFY( (test_property<is_nothrow_constructible, NoexceptExplicitClass>
- (false)) );
- VERIFY( (test_property<is_nothrow_constructible, NoexceptExplicitClass,
- int, double>(false)) );
- VERIFY( (test_property<is_nothrow_constructible, NothrowExplicitClass,
- void*>(false)) );
- VERIFY( (test_property<is_nothrow_constructible, NothrowExplicitClass>
- (false)) );
- VERIFY( (test_property<is_nothrow_constructible, NothrowExplicitClass,
- int, double>(false)) );
+ static_assert(test_property<is_nothrow_constructible, NoexceptExplicitClass,
+ void*>(false), "");
+ static_assert(test_property<is_nothrow_constructible, NoexceptExplicitClass>
+ (false), "");
+ static_assert(test_property<is_nothrow_constructible, NoexceptExplicitClass,
+ int, double>(false), "");
+ static_assert(test_property<is_nothrow_constructible, NothrowExplicitClass,
+ void*>(false), "");
+ static_assert(test_property<is_nothrow_constructible, NothrowExplicitClass>
+ (false), "");
+ static_assert(test_property<is_nothrow_constructible, NothrowExplicitClass,
+ int, double>(false), "");
- VERIFY( (test_property<is_nothrow_constructible, ExceptExplicitClass,
- double&>(false)) );
- VERIFY( (test_property<is_nothrow_constructible, ExceptExplicitClass,
- int&>(false)) );
- VERIFY( (test_property<is_nothrow_constructible, ExceptExplicitClass,
- double&, int&, double&>(false)) );
- VERIFY( (test_property<is_nothrow_constructible, ThrowExplicitClass,
- double&>(false)) );
- VERIFY( (test_property<is_nothrow_constructible, ThrowExplicitClass,
- int&>(false)) );
- VERIFY( (test_property<is_nothrow_constructible, ThrowExplicitClass,
- double&, int&, double&>(false)) );
+ static_assert(test_property<is_nothrow_constructible, ExceptExplicitClass,
+ double&>(false), "");
+ static_assert(test_property<is_nothrow_constructible, ExceptExplicitClass,
+ int&>(false), "");
+ static_assert(test_property<is_nothrow_constructible, ExceptExplicitClass,
+ double&, int&, double&>(false), "");
+ static_assert(test_property<is_nothrow_constructible, ThrowExplicitClass,
+ double&>(false), "");
+ static_assert(test_property<is_nothrow_constructible, ThrowExplicitClass,
+ int&>(false), "");
+ static_assert(test_property<is_nothrow_constructible, ThrowExplicitClass,
+ double&, int&, double&>(false), "");
- VERIFY( (test_property<is_nothrow_constructible, int[]>(false)) );
-}
-
-int main()
-{
- test01();
- return 0;
+ static_assert(test_property<is_nothrow_constructible, int[]>(false), "");
}
diff --git a/libstdc++-v3/testsuite/20_util/is_nothrow_copy_assignable/value.cc b/libstdc++-v3/testsuite/20_util/is_nothrow_copy_assignable/value.cc
index 72ce0a069f1..c787e4b5d59 100644
--- a/libstdc++-v3/testsuite/20_util/is_nothrow_copy_assignable/value.cc
+++ b/libstdc++-v3/testsuite/20_util/is_nothrow_copy_assignable/value.cc
@@ -1,4 +1,6 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+
// 2010-06-08 Paolo Carlini <paolo.carlini@oracle.com>
//
// Copyright (C) 2010-2013 Free Software Foundation, Inc.
@@ -19,65 +21,59 @@
// <http://www.gnu.org/licenses/>.
#include <type_traits>
-#include <testsuite_hooks.h>
#include <testsuite_tr1.h>
void test01()
{
- bool test __attribute__((unused)) = true;
using std::is_nothrow_copy_assignable;
using namespace __gnu_test;
// Positive tests.
- VERIFY( (test_property<is_nothrow_copy_assignable, int>(true)) );
- VERIFY( (test_property<is_nothrow_copy_assignable, float>(true)) );
- VERIFY( (test_property<is_nothrow_copy_assignable, EnumType>(true)) );
- VERIFY( (test_property<is_nothrow_copy_assignable, int*>(true)) );
- VERIFY( (test_property<is_nothrow_copy_assignable, int(*)(int)>(true)) );
- VERIFY( (test_property<is_nothrow_copy_assignable,
- int (ClassType::*)>(true)) );
- VERIFY( (test_property<is_nothrow_copy_assignable,
- int (ClassType::*) (int)>(true)) );
+ static_assert(test_property<is_nothrow_copy_assignable, int>(true), "");
+ static_assert(test_property<is_nothrow_copy_assignable, float>(true), "");
+ static_assert(test_property<is_nothrow_copy_assignable, EnumType>(true), "");
+ static_assert(test_property<is_nothrow_copy_assignable, int*>(true), "");
+ static_assert(test_property<is_nothrow_copy_assignable,
+ int(*)(int)>(true), "");
+ static_assert(test_property<is_nothrow_copy_assignable,
+ int (ClassType::*)>(true), "");
+ static_assert(test_property<is_nothrow_copy_assignable,
+ int (ClassType::*) (int)>(true), "");
- VERIFY( (test_property<is_nothrow_copy_assignable,
- NoexceptCopyAssignClass>(true)) );
+ static_assert(test_property<is_nothrow_copy_assignable,
+ NoexceptCopyAssignClass>(true), "");
// Negative tests.
- VERIFY( (test_property<is_nothrow_copy_assignable, void>(false)) );
- VERIFY( (test_property<is_nothrow_copy_assignable, int[2]>(false)) );
- VERIFY( (test_property<is_nothrow_copy_assignable, float[][3]>(false)) );
- VERIFY( (test_property<is_nothrow_copy_assignable,
- EnumType[2][3][4]>(false)) );
- VERIFY( (test_property<is_nothrow_copy_assignable, int*[3]>(false)) );
- VERIFY( (test_property<is_nothrow_copy_assignable,
- int(*[][2])(int)>(false)) );
- VERIFY( (test_property<is_nothrow_copy_assignable,
- int (ClassType::*[2][3])>(false)) );
- VERIFY( (test_property<is_nothrow_copy_assignable,
- int (ClassType::*[][2][3]) (int)>(false)) );
- VERIFY( (test_property<is_nothrow_copy_assignable,
- ClassType(unsigned) const &>(false)) );
- VERIFY( (test_property<is_nothrow_copy_assignable,
- bool(ClassType) const>(false)) );
- VERIFY( (test_property<is_nothrow_copy_assignable,
- bool(...) &&>(false)) );
- VERIFY( (test_property<is_nothrow_copy_assignable,
- EnumType(int, ...)>(false)) );
-
- VERIFY( (test_property<is_nothrow_copy_assignable,
- ExceptCopyAssignClass>(false)) );
- VERIFY( (test_property<is_nothrow_copy_assignable,
- NoexceptMoveAssignClass>(false)) );
- VERIFY( (test_property<is_nothrow_copy_assignable,
- ExceptMoveAssignClass>(false)) );
- VERIFY( (test_property<is_nothrow_copy_assignable,
- DeletedCopyAssignClass>(false)) );
- VERIFY( (test_property<is_nothrow_copy_assignable,
- DeletedMoveAssignClass>(false)) );
-}
+ static_assert(test_property<is_nothrow_copy_assignable, void>(false), "");
+ static_assert(test_property<is_nothrow_copy_assignable, int[2]>(false), "");
+ static_assert(test_property<is_nothrow_copy_assignable,
+ float[][3]>(false), "");
+ static_assert(test_property<is_nothrow_copy_assignable,
+ EnumType[2][3][4]>(false), "");
+ static_assert(test_property<is_nothrow_copy_assignable, int*[3]>(false), "");
+ static_assert(test_property<is_nothrow_copy_assignable,
+ int(*[][2])(int)>(false), "");
+ static_assert(test_property<is_nothrow_copy_assignable,
+ int (ClassType::*[2][3])>(false), "");
+ static_assert(test_property<is_nothrow_copy_assignable,
+ int (ClassType::*[][2][3]) (int)>(false), "");
+ static_assert(test_property<is_nothrow_copy_assignable,
+ ClassType(unsigned) const &>(false), "");
+ static_assert(test_property<is_nothrow_copy_assignable,
+ bool(ClassType) const>(false), "");
+ static_assert(test_property<is_nothrow_copy_assignable,
+ bool(...) &&>(false), "");
+ static_assert(test_property<is_nothrow_copy_assignable,
+ EnumType(int, ...)>(false), "");
-int main()
-{
- test01();
- return 0;
+ static_assert(test_property<is_nothrow_copy_assignable,
+ ExceptCopyAssignClass>(false), "");
+ static_assert(test_property<is_nothrow_copy_assignable,
+ NoexceptMoveAssignClass>(false), "");
+ static_assert(test_property<is_nothrow_copy_assignable,
+ ExceptMoveAssignClass>(false), "");
+ static_assert(test_property<is_nothrow_copy_assignable,
+ DeletedCopyAssignClass>(false), "");
+ static_assert(test_property<is_nothrow_copy_assignable,
+ DeletedMoveAssignClass>(false), "");
}
diff --git a/libstdc++-v3/testsuite/20_util/is_nothrow_copy_constructible/value.cc b/libstdc++-v3/testsuite/20_util/is_nothrow_copy_constructible/value.cc
index 33d82af54e9..8b7d324a3fb 100644
--- a/libstdc++-v3/testsuite/20_util/is_nothrow_copy_constructible/value.cc
+++ b/libstdc++-v3/testsuite/20_util/is_nothrow_copy_constructible/value.cc
@@ -1,4 +1,6 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+
// 2004-12-30 Paolo Carlini <pcarlini@suse.de>
//
// Copyright (C) 2004-2013 Free Software Foundation, Inc.
@@ -19,64 +21,61 @@
// <http://www.gnu.org/licenses/>.
#include <type_traits>
-#include <testsuite_hooks.h>
#include <testsuite_tr1.h>
void test01()
{
- bool test __attribute__((unused)) = true;
using std::is_nothrow_copy_constructible;
using namespace __gnu_test;
// Positive tests.
- VERIFY( (test_category<is_nothrow_copy_constructible, int>(true)) );
- VERIFY( (test_category<is_nothrow_copy_constructible, float>(true)) );
- VERIFY( (test_category<is_nothrow_copy_constructible, EnumType>(true)) );
- VERIFY( (test_category<is_nothrow_copy_constructible, int*>(true)) );
- VERIFY( (test_category<is_nothrow_copy_constructible, int(*)(int)>(true)) );
- VERIFY( (test_category<is_nothrow_copy_constructible,
- int (ClassType::*)>(true)) );
- VERIFY( (test_category<is_nothrow_copy_constructible,
- int (ClassType::*) (int)>(true)) );
+ static_assert(test_category<is_nothrow_copy_constructible, int>(true), "");
+ static_assert(test_category<is_nothrow_copy_constructible, float>(true), "");
+ static_assert(test_category<is_nothrow_copy_constructible,
+ EnumType>(true), "");
+ static_assert(test_category<is_nothrow_copy_constructible, int*>(true), "");
+ static_assert(test_category<is_nothrow_copy_constructible,
+ int(*)(int)>(true), "");
+ static_assert(test_category<is_nothrow_copy_constructible,
+ int (ClassType::*)>(true), "");
+ static_assert(test_category<is_nothrow_copy_constructible,
+ int (ClassType::*) (int)>(true), "");
- VERIFY( (test_property<is_nothrow_copy_constructible,
- NoexceptCopyConsClass>(true)) );
- VERIFY( (test_property<is_nothrow_copy_constructible,
- const NoexceptCopyConsClass>(true)) );
+ static_assert(test_property<is_nothrow_copy_constructible,
+ NoexceptCopyConsClass>(true), "");
+ static_assert(test_property<is_nothrow_copy_constructible,
+ const NoexceptCopyConsClass>(true), "");
// Negative tests.
- VERIFY( (test_category<is_nothrow_copy_constructible, void>(false)) );
- VERIFY( (test_category<is_nothrow_copy_constructible, int[2]>(false)) );
- VERIFY( (test_category<is_nothrow_copy_constructible, int[]>(false)) );
- VERIFY( (test_category<is_nothrow_copy_constructible, float[][3]>(false)) );
- VERIFY( (test_category<is_nothrow_copy_constructible,
- EnumType[2][3][4]>(false)) );
- VERIFY( (test_category<is_nothrow_copy_constructible, int*[3]>(false)) );
- VERIFY( (test_category<is_nothrow_copy_constructible,
- int(*[][2])(int)>(false)) );
- VERIFY( (test_category<is_nothrow_copy_constructible,
- int (ClassType::*[2][3])>(false)) );
- VERIFY( (test_category<is_nothrow_copy_constructible,
- int (ClassType::*[][2][3]) (int)>(false)) );
- VERIFY( (test_category<is_nothrow_copy_constructible,
- ClassType(unsigned) const &>(false)) );
- VERIFY( (test_category<is_nothrow_copy_constructible,
- bool(ClassType) const>(false)) );
- VERIFY( (test_category<is_nothrow_copy_constructible,
- bool(...) &&>(false)) );
- VERIFY( (test_category<is_nothrow_copy_constructible,
- EnumType(int, ...)>(false)) );
-
- VERIFY( (test_property<is_nothrow_copy_constructible,
- volatile NoexceptCopyConsClass>(false)) );
- VERIFY( (test_property<is_nothrow_copy_constructible,
- ThrowCopyConsClass>(false)) );
- VERIFY( (test_property<is_nothrow_copy_constructible,
- ExceptCopyConsClass>(false)) );
-}
+ static_assert(test_category<is_nothrow_copy_constructible, void>(false), "");
+ static_assert(test_category<is_nothrow_copy_constructible,
+ int[2]>(false), "");
+ static_assert(test_category<is_nothrow_copy_constructible, int[]>(false), "");
+ static_assert(test_category<is_nothrow_copy_constructible,
+ float[][3]>(false), "");
+ static_assert(test_category<is_nothrow_copy_constructible,
+ EnumType[2][3][4]>(false), "");
+ static_assert(test_category<is_nothrow_copy_constructible,
+ int*[3]>(false), "");
+ static_assert(test_category<is_nothrow_copy_constructible,
+ int(*[][2])(int)>(false), "");
+ static_assert(test_category<is_nothrow_copy_constructible,
+ int (ClassType::*[2][3])>(false), "");
+ static_assert(test_category<is_nothrow_copy_constructible,
+ int (ClassType::*[][2][3]) (int)>(false), "");
+ static_assert(test_category<is_nothrow_copy_constructible,
+ ClassType(unsigned) const &>(false), "");
+ static_assert(test_category<is_nothrow_copy_constructible,
+ bool(ClassType) const>(false), "");
+ static_assert(test_category<is_nothrow_copy_constructible,
+ bool(...) &&>(false), "");
+ static_assert(test_category<is_nothrow_copy_constructible,
+ EnumType(int, ...)>(false), "");
-int main()
-{
- test01();
- return 0;
+ static_assert(test_property<is_nothrow_copy_constructible,
+ volatile NoexceptCopyConsClass>(false), "");
+ static_assert(test_property<is_nothrow_copy_constructible,
+ ThrowCopyConsClass>(false), "");
+ static_assert(test_property<is_nothrow_copy_constructible,
+ ExceptCopyConsClass>(false), "");
}
diff --git a/libstdc++-v3/testsuite/20_util/is_nothrow_default_constructible/value.cc b/libstdc++-v3/testsuite/20_util/is_nothrow_default_constructible/value.cc
index e04ff0c8c5c..10ee4a474bf 100644
--- a/libstdc++-v3/testsuite/20_util/is_nothrow_default_constructible/value.cc
+++ b/libstdc++-v3/testsuite/20_util/is_nothrow_default_constructible/value.cc
@@ -1,4 +1,6 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+
// 2004-12-29 Paolo Carlini <pcarlini@suse.de>
//
// Copyright (C) 2004-2013 Free Software Foundation, Inc.
@@ -19,55 +21,55 @@
// <http://www.gnu.org/licenses/>.
#include <type_traits>
-#include <testsuite_hooks.h>
#include <testsuite_tr1.h>
void test01()
{
- bool test __attribute__((unused)) = true;
using std::is_nothrow_default_constructible;
using namespace __gnu_test;
// Positive tests.
- VERIFY( (test_category<is_nothrow_default_constructible, int>(true)) );
- VERIFY( (test_category<is_nothrow_default_constructible, float>(true)) );
- VERIFY( (test_category<is_nothrow_default_constructible, EnumType>(true)) );
- VERIFY( (test_category<is_nothrow_default_constructible, int*>(true)) );
- VERIFY( (test_category<is_nothrow_default_constructible,
- int(*)(int)>(true)) );
- VERIFY( (test_category<is_nothrow_default_constructible,
- int (ClassType::*)>(true)) );
- VERIFY( (test_category<is_nothrow_default_constructible,
- int (ClassType::*) (int)>(true)) );
- VERIFY( (test_category<is_nothrow_default_constructible, int[2]>(true)) );
- VERIFY( (test_category<is_nothrow_default_constructible,
- EnumType[2][3][4]>(true)) );
- VERIFY( (test_category<is_nothrow_default_constructible, int*[3]>(true)) );
- VERIFY( (test_category<is_nothrow_default_constructible,
- int (ClassType::*[2][3])>(true)) );
- VERIFY( (test_category<is_nothrow_default_constructible, ClassType>(true)) );
+ static_assert(test_category<is_nothrow_default_constructible, int>(true), "");
+ static_assert(test_category<is_nothrow_default_constructible,
+ float>(true), "");
+ static_assert(test_category<is_nothrow_default_constructible,
+ EnumType>(true), "");
+ static_assert(test_category<is_nothrow_default_constructible,
+ int*>(true), "");
+ static_assert(test_category<is_nothrow_default_constructible,
+ int(*)(int)>(true), "");
+ static_assert(test_category<is_nothrow_default_constructible,
+ int (ClassType::*)>(true), "");
+ static_assert(test_category<is_nothrow_default_constructible,
+ int (ClassType::*) (int)>(true), "");
+ static_assert(test_category<is_nothrow_default_constructible,
+ int[2]>(true), "");
+ static_assert(test_category<is_nothrow_default_constructible,
+ EnumType[2][3][4]>(true), "");
+ static_assert(test_category<is_nothrow_default_constructible,
+ int*[3]>(true), "");
+ static_assert(test_category<is_nothrow_default_constructible,
+ int (ClassType::*[2][3])>(true), "");
+ static_assert(test_category<is_nothrow_default_constructible,
+ ClassType>(true), "");
- VERIFY( (test_category<is_nothrow_default_constructible,
- NoexceptDefaultClass>(true)) );
+ static_assert(test_category<is_nothrow_default_constructible,
+ NoexceptDefaultClass>(true), "");
// Negative tests.
- VERIFY( (test_category<is_nothrow_default_constructible, void>(false)) );
- VERIFY( (test_category<is_nothrow_default_constructible, int[]>(false)) );
- VERIFY( (test_category<is_nothrow_default_constructible,
- float[][3]>(false)) );
- VERIFY( (test_category<is_nothrow_default_constructible,
- int(*[][2])(int)>(false)) );
- VERIFY( (test_category<is_nothrow_default_constructible,
- int (ClassType::*[][2][3]) (int)>(false)) );
-
- VERIFY( (test_category<is_nothrow_default_constructible,
- ThrowDefaultClass>(false)) );
- VERIFY( (test_category<is_nothrow_default_constructible,
- ExceptDefaultClass>(false)) );
-}
+ static_assert(test_category<is_nothrow_default_constructible,
+ void>(false), "");
+ static_assert(test_category<is_nothrow_default_constructible,
+ int[]>(false), "");
+ static_assert(test_category<is_nothrow_default_constructible,
+ float[][3]>(false), "");
+ static_assert(test_category<is_nothrow_default_constructible,
+ int(*[][2])(int)>(false), "");
+ static_assert(test_category<is_nothrow_default_constructible,
+ int (ClassType::*[][2][3]) (int)>(false), "");
-int main()
-{
- test01();
- return 0;
+ static_assert(test_category<is_nothrow_default_constructible,
+ ThrowDefaultClass>(false), "");
+ static_assert(test_category<is_nothrow_default_constructible,
+ ExceptDefaultClass>(false), "");
}
diff --git a/libstdc++-v3/testsuite/20_util/is_nothrow_move_assignable/value.cc b/libstdc++-v3/testsuite/20_util/is_nothrow_move_assignable/value.cc
index 54d94c2f234..a7251a9e0f4 100644
--- a/libstdc++-v3/testsuite/20_util/is_nothrow_move_assignable/value.cc
+++ b/libstdc++-v3/testsuite/20_util/is_nothrow_move_assignable/value.cc
@@ -1,4 +1,6 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+
// 2011-05-19 Paolo Carlini <paolo.carlini@oracle.com>
//
// Copyright (C) 2011-2013 Free Software Foundation, Inc.
@@ -19,65 +21,59 @@
// <http://www.gnu.org/licenses/>.
#include <type_traits>
-#include <testsuite_hooks.h>
#include <testsuite_tr1.h>
void test01()
{
- bool test __attribute__((unused)) = true;
using std::is_nothrow_move_assignable;
using namespace __gnu_test;
// Positive tests.
- VERIFY( (test_property<is_nothrow_move_assignable, int>(true)) );
- VERIFY( (test_property<is_nothrow_move_assignable, float>(true)) );
- VERIFY( (test_property<is_nothrow_move_assignable, EnumType>(true)) );
- VERIFY( (test_property<is_nothrow_move_assignable, int*>(true)) );
- VERIFY( (test_property<is_nothrow_move_assignable, int(*)(int)>(true)) );
- VERIFY( (test_property<is_nothrow_move_assignable,
- int (ClassType::*)>(true)) );
- VERIFY( (test_property<is_nothrow_move_assignable,
- int (ClassType::*) (int)>(true)) );
+ static_assert(test_property<is_nothrow_move_assignable, int>(true), "");
+ static_assert(test_property<is_nothrow_move_assignable, float>(true), "");
+ static_assert(test_property<is_nothrow_move_assignable, EnumType>(true), "");
+ static_assert(test_property<is_nothrow_move_assignable, int*>(true), "");
+ static_assert(test_property<is_nothrow_move_assignable,
+ int(*)(int)>(true), "");
+ static_assert(test_property<is_nothrow_move_assignable,
+ int (ClassType::*)>(true), "");
+ static_assert(test_property<is_nothrow_move_assignable,
+ int (ClassType::*) (int)>(true), "");
- VERIFY( (test_property<is_nothrow_move_assignable,
- NoexceptMoveAssignClass>(true)) );
- VERIFY( (test_property<is_nothrow_move_assignable,
- NoexceptCopyAssignClass>(true)) );
+ static_assert(test_property<is_nothrow_move_assignable,
+ NoexceptMoveAssignClass>(true), "");
+ static_assert(test_property<is_nothrow_move_assignable,
+ NoexceptCopyAssignClass>(true), "");
// Negative tests.
- VERIFY( (test_property<is_nothrow_move_assignable, void>(false)) );
- VERIFY( (test_property<is_nothrow_move_assignable, int[2]>(false)) );
- VERIFY( (test_property<is_nothrow_move_assignable, float[][3]>(false)) );
- VERIFY( (test_property<is_nothrow_move_assignable,
- EnumType[2][3][4]>(false)) );
- VERIFY( (test_property<is_nothrow_move_assignable, int*[3]>(false)) );
- VERIFY( (test_property<is_nothrow_move_assignable,
- int(*[][2])(int)>(false)) );
- VERIFY( (test_property<is_nothrow_move_assignable,
- int (ClassType::*[2][3])>(false)) );
- VERIFY( (test_property<is_nothrow_move_assignable,
- int (ClassType::*[][2][3]) (int)>(false)) );
- VERIFY( (test_property<is_nothrow_move_assignable,
- ClassType(unsigned) const &>(false)) );
- VERIFY( (test_property<is_nothrow_move_assignable,
- bool(ClassType) const>(false)) );
- VERIFY( (test_property<is_nothrow_move_assignable,
- bool(...) &&>(false)) );
- VERIFY( (test_property<is_nothrow_move_assignable,
- EnumType(int, ...)>(false)) );
-
- VERIFY( (test_property<is_nothrow_move_assignable,
- ExceptMoveAssignClass>(false)) );
- VERIFY( (test_property<is_nothrow_move_assignable,
- ExceptCopyAssignClass>(false)) );
- VERIFY( (test_property<is_nothrow_move_assignable,
- DeletedMoveAssignClass>(false)) );
- VERIFY( (test_property<is_nothrow_move_assignable,
- DeletedCopyAssignClass>(false)) );
-}
+ static_assert(test_property<is_nothrow_move_assignable, void>(false), "");
+ static_assert(test_property<is_nothrow_move_assignable, int[2]>(false), "");
+ static_assert(test_property<is_nothrow_move_assignable,
+ float[][3]>(false), "");
+ static_assert(test_property<is_nothrow_move_assignable,
+ EnumType[2][3][4]>(false), "");
+ static_assert(test_property<is_nothrow_move_assignable, int*[3]>(false), "");
+ static_assert(test_property<is_nothrow_move_assignable,
+ int(*[][2])(int)>(false), "");
+ static_assert(test_property<is_nothrow_move_assignable,
+ int (ClassType::*[2][3])>(false), "");
+ static_assert(test_property<is_nothrow_move_assignable,
+ int (ClassType::*[][2][3]) (int)>(false), "");
+ static_assert(test_property<is_nothrow_move_assignable,
+ ClassType(unsigned) const &>(false), "");
+ static_assert(test_property<is_nothrow_move_assignable,
+ bool(ClassType) const>(false), "");
+ static_assert(test_property<is_nothrow_move_assignable,
+ bool(...) &&>(false), "");
+ static_assert(test_property<is_nothrow_move_assignable,
+ EnumType(int, ...)>(false), "");
-int main()
-{
- test01();
- return 0;
+ static_assert(test_property<is_nothrow_move_assignable,
+ ExceptMoveAssignClass>(false), "");
+ static_assert(test_property<is_nothrow_move_assignable,
+ ExceptCopyAssignClass>(false), "");
+ static_assert(test_property<is_nothrow_move_assignable,
+ DeletedMoveAssignClass>(false), "");
+ static_assert(test_property<is_nothrow_move_assignable,
+ DeletedCopyAssignClass>(false), "");
}
diff --git a/libstdc++-v3/testsuite/20_util/is_nothrow_move_constructible/value.cc b/libstdc++-v3/testsuite/20_util/is_nothrow_move_constructible/value.cc
index 9afe428f765..868e4e7b377 100644
--- a/libstdc++-v3/testsuite/20_util/is_nothrow_move_constructible/value.cc
+++ b/libstdc++-v3/testsuite/20_util/is_nothrow_move_constructible/value.cc
@@ -1,4 +1,5 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
//
// Copyright (C) 2011-2013 Free Software Foundation, Inc.
//
@@ -18,64 +19,62 @@
// <http://www.gnu.org/licenses/>.
#include <type_traits>
-#include <testsuite_hooks.h>
#include <testsuite_tr1.h>
void test01()
{
- bool test __attribute__((unused)) = true;
using std::is_nothrow_move_constructible;
using namespace __gnu_test;
// Positive tests.
- VERIFY( (test_category<is_nothrow_move_constructible, int>(true)) );
- VERIFY( (test_category<is_nothrow_move_constructible, float>(true)) );
- VERIFY( (test_category<is_nothrow_move_constructible, EnumType>(true)) );
- VERIFY( (test_category<is_nothrow_move_constructible, int*>(true)) );
- VERIFY( (test_category<is_nothrow_move_constructible, int(*)(int)>(true)) );
- VERIFY( (test_category<is_nothrow_move_constructible,
- int (ClassType::*)>(true)) );
- VERIFY( (test_category<is_nothrow_move_constructible,
- int (ClassType::*) (int)>(true)) );
+ static_assert(test_category<is_nothrow_move_constructible, int>(true), "");
+ static_assert(test_category<is_nothrow_move_constructible, float>(true), "");
+ static_assert(test_category<is_nothrow_move_constructible,
+ EnumType>(true), "");
+ static_assert(test_category<is_nothrow_move_constructible, int*>(true), "");
+ static_assert(test_category<is_nothrow_move_constructible,
+ int(*)(int)>(true), "");
+ static_assert(test_category<is_nothrow_move_constructible,
+ int (ClassType::*)>(true), "");
+ static_assert(test_category<is_nothrow_move_constructible,
+ int (ClassType::*) (int)>(true), "");
- VERIFY( (test_property<is_nothrow_move_constructible,
- NoexceptMoveConsClass>(true)) );
+ static_assert(test_property<is_nothrow_move_constructible,
+ NoexceptMoveConsClass>(true), "");
// Negative tests.
- VERIFY( (test_category<is_nothrow_move_constructible, void>(false)) );
- VERIFY( (test_category<is_nothrow_move_constructible, int[2]>(false)) );
- VERIFY( (test_category<is_nothrow_move_constructible, int[]>(false)) );
- VERIFY( (test_category<is_nothrow_move_constructible, float[][3]>(false)) );
- VERIFY( (test_category<is_nothrow_move_constructible,
- EnumType[2][3][4]>(false)) );
- VERIFY( (test_category<is_nothrow_move_constructible, int*[3]>(false)) );
- VERIFY( (test_category<is_nothrow_move_constructible,
- int(*[][2])(int)>(false)) );
- VERIFY( (test_category<is_nothrow_move_constructible,
- int (ClassType::*[2][3])>(false)) );
- VERIFY( (test_category<is_nothrow_move_constructible,
- int (ClassType::*[][2][3]) (int)>(false)) );
- VERIFY( (test_category<is_nothrow_move_constructible,
- ClassType(unsigned) const &>(false)) );
- VERIFY( (test_category<is_nothrow_move_constructible,
- bool(ClassType) const>(false)) );
- VERIFY( (test_category<is_nothrow_move_constructible,
- bool(...) &&>(false)) );
- VERIFY( (test_category<is_nothrow_move_constructible,
- EnumType(int, ...)>(false)) );
+ static_assert(test_category<is_nothrow_move_constructible, void>(false), "");
+ static_assert(test_category<is_nothrow_move_constructible,
+ int[2]>(false), "");
+ static_assert(test_category<is_nothrow_move_constructible,
+ int[]>(false), "");
+ static_assert(test_category<is_nothrow_move_constructible,
+ float[][3]>(false), "");
+ static_assert(test_category<is_nothrow_move_constructible,
+ EnumType[2][3][4]>(false), "");
+ static_assert(test_category<is_nothrow_move_constructible,
+ int*[3]>(false), "");
+ static_assert(test_category<is_nothrow_move_constructible,
+ int(*[][2])(int)>(false), "");
+ static_assert(test_category<is_nothrow_move_constructible,
+ int (ClassType::*[2][3])>(false), "");
+ static_assert(test_category<is_nothrow_move_constructible,
+ int (ClassType::*[][2][3]) (int)>(false), "");
+ static_assert(test_category<is_nothrow_move_constructible,
+ ClassType(unsigned) const &>(false), "");
+ static_assert(test_category<is_nothrow_move_constructible,
+ bool(ClassType) const>(false), "");
+ static_assert(test_category<is_nothrow_move_constructible,
+ bool(...) &&>(false), "");
+ static_assert(test_category<is_nothrow_move_constructible,
+ EnumType(int, ...)>(false), "");
- VERIFY( (test_property<is_nothrow_move_constructible,
- const NoexceptMoveConsClass>(false)) );
- VERIFY( (test_property<is_nothrow_move_constructible,
- volatile NoexceptMoveConsClass>(false)) );
- VERIFY( (test_property<is_nothrow_move_constructible,
- ThrowMoveConsClass>(false)) );
- VERIFY( (test_property<is_nothrow_move_constructible,
- ExceptMoveConsClass>(false)) );
-}
-
-int main()
-{
- test01();
- return 0;
+ static_assert(test_property<is_nothrow_move_constructible,
+ const NoexceptMoveConsClass>(false), "");
+ static_assert(test_property<is_nothrow_move_constructible,
+ volatile NoexceptMoveConsClass>(false), "");
+ static_assert(test_property<is_nothrow_move_constructible,
+ ThrowMoveConsClass>(false), "");
+ static_assert(test_property<is_nothrow_move_constructible,
+ ExceptMoveConsClass>(false), "");
}
diff --git a/libstdc++-v3/testsuite/20_util/is_null_pointer/value.cc b/libstdc++-v3/testsuite/20_util/is_null_pointer/value.cc
index 2bee73a6a0b..b4e2fa7ea31 100644
--- a/libstdc++-v3/testsuite/20_util/is_null_pointer/value.cc
+++ b/libstdc++-v3/testsuite/20_util/is_null_pointer/value.cc
@@ -1,4 +1,6 @@
// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+
// 2013-05-02 Paolo Carlini <pcarlini@suse.de>
//
// Copyright (C) 2013 Free Software Foundation, Inc.
@@ -19,42 +21,36 @@
// <http://www.gnu.org/licenses/>.
#include <type_traits>
-#include <testsuite_hooks.h>
#include <testsuite_tr1.h>
void test01()
{
- bool test __attribute__((unused)) = true;
using std::is_null_pointer;
using namespace __gnu_test;
- VERIFY( (test_category<is_null_pointer, std::nullptr_t>(true)) );
-
- VERIFY( (test_category<is_null_pointer, int>(false)) );
- VERIFY( (test_category<is_null_pointer, float>(false)) );
- VERIFY( (test_category<is_null_pointer, EnumType>(false)) );
- VERIFY( (test_category<is_null_pointer, int*>(false)) );
- VERIFY( (test_category<is_null_pointer, int(*)(int)>(false)) );
- VERIFY( (test_category<is_null_pointer, int (ClassType::*)>(false)) );
- VERIFY( (test_category<is_null_pointer, int (ClassType::*) (int)>(false)) );
- VERIFY( (test_category<is_null_pointer, int[2]>(false)) );
- VERIFY( (test_category<is_null_pointer, float[][3]>(false)) );
- VERIFY( (test_category<is_null_pointer, EnumType[2][3][4]>(false)) );
- VERIFY( (test_category<is_null_pointer, int*[3]>(false)) );
- VERIFY( (test_category<is_null_pointer, int(*[][2])(int)>(false)) );
- VERIFY( (test_category<is_null_pointer, int (ClassType::*[2][3])>(false)) );
- VERIFY( (test_category<is_null_pointer,
- int (ClassType::*[][2][3]) (int)>(false)) );
- VERIFY( (test_category<is_null_pointer, ClassType>(false)) );
- VERIFY( (test_category<is_null_pointer, PODType>(false)) );
- VERIFY( (test_category<is_null_pointer, void>(false)) );
- VERIFY( (test_category<is_null_pointer, NType>(false)) );
- VERIFY( (test_category<is_null_pointer, TType>(false)) );
- VERIFY( (test_category<is_null_pointer, SLType>(false)) );
-}
+ static_assert(test_category<is_null_pointer, std::nullptr_t>(true), "");
-int main()
-{
- test01();
- return 0;
+ static_assert(test_category<is_null_pointer, int>(false), "");
+ static_assert(test_category<is_null_pointer, float>(false), "");
+ static_assert(test_category<is_null_pointer, EnumType>(false), "");
+ static_assert(test_category<is_null_pointer, int*>(false), "");
+ static_assert(test_category<is_null_pointer, int(*)(int)>(false), "");
+ static_assert(test_category<is_null_pointer, int (ClassType::*)>(false), "");
+ static_assert(test_category<is_null_pointer,
+ int (ClassType::*) (int)>(false), "");
+ static_assert(test_category<is_null_pointer, int[2]>(false), "");
+ static_assert(test_category<is_null_pointer, float[][3]>(false), "");
+ static_assert(test_category<is_null_pointer, EnumType[2][3][4]>(false), "");
+ static_assert(test_category<is_null_pointer, int*[3]>(false), "");
+ static_assert(test_category<is_null_pointer, int(*[][2])(int)>(false), "");
+ static_assert(test_category<is_null_pointer,
+ int (ClassType::*[2][3])>(false), "");
+ static_assert(test_category<is_null_pointer,
+ int (ClassType::*[][2][3]) (int)>(false), "");
+ static_assert(test_category<is_null_pointer, ClassType>(false), "");
+ static_assert(test_category<is_null_pointer, PODType>(false), "");
+ static_assert(test_category<is_null_pointer, void>(false), "");
+ static_assert(test_category<is_null_pointer, NType>(false), "");
+ static_assert(test_category<is_null_pointer, TType>(false), "");
+ static_assert(test_category<is_null_pointer, SLType>(false), "");
}
diff --git a/libstdc++-v3/testsuite/20_util/is_object/value.cc b/libstdc++-v3/testsuite/20_util/is_object/value.cc
index 458d11d83fb..be35fb2eef1 100644
--- a/libstdc++-v3/testsuite/20_util/is_object/value.cc
+++ b/libstdc++-v3/testsuite/20_util/is_object/value.cc
@@ -1,4 +1,5 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
// Copyright (C) 2011-2013 Free Software Foundation, Inc.
//
@@ -18,30 +19,23 @@
// <http://www.gnu.org/licenses/>.
#include <type_traits>
-#include <testsuite_hooks.h>
#include <testsuite_tr1.h>
void test01()
{
- bool test __attribute__((unused)) = true;
using std::is_object;
using namespace __gnu_test;
- VERIFY( (test_category<is_object, int (int)>(false)) );
- VERIFY( (test_category<is_object, ClassType (ClassType)>(false)) );
- VERIFY( (test_category<is_object, float (int, float, int[], int&)>(false)) );
- VERIFY( (test_category<is_object, int&>(false)) );
- VERIFY( (test_category<is_object, ClassType&>(false)) );
- VERIFY( (test_category<is_object, int(&)(int)>(false)) );
- VERIFY( (test_category<is_object, void>(false)) );
- VERIFY( (test_category<is_object, const void>(false)) );
+ static_assert(test_category<is_object, int (int)>(false), "");
+ static_assert(test_category<is_object, ClassType (ClassType)>(false), "");
+ static_assert(test_category<is_object,
+ float (int, float, int[], int&)>(false), "");
+ static_assert(test_category<is_object, int&>(false), "");
+ static_assert(test_category<is_object, ClassType&>(false), "");
+ static_assert(test_category<is_object, int(&)(int)>(false), "");
+ static_assert(test_category<is_object, void>(false), "");
+ static_assert(test_category<is_object, const void>(false), "");
// Sanity check.
- VERIFY( (test_category<is_object, ClassType>(true)) );
-}
-
-int main()
-{
- test01();
- return 0;
+ static_assert(test_category<is_object, ClassType>(true), "");
}
diff --git a/libstdc++-v3/testsuite/20_util/is_pod/value.cc b/libstdc++-v3/testsuite/20_util/is_pod/value.cc
index ee9bb522dce..93bcc040a4d 100644
--- a/libstdc++-v3/testsuite/20_util/is_pod/value.cc
+++ b/libstdc++-v3/testsuite/20_util/is_pod/value.cc
@@ -1,4 +1,6 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+
// 2010-02-21 Paolo Carlini <pcarlini@suse.de>
//
// Copyright (C) 2010-2013 Free Software Foundation, Inc.
@@ -19,40 +21,33 @@
// <http://www.gnu.org/licenses/>.
#include <type_traits>
-#include <testsuite_hooks.h>
#include <testsuite_tr1.h>
void test01()
{
- bool test __attribute__((unused)) = true;
using std::is_pod;
using namespace __gnu_test;
- VERIFY( (test_category<is_pod, int>(true)) );
- VERIFY( (test_category<is_pod, float>(true)) );
- VERIFY( (test_category<is_pod, EnumType>(true)) );
- VERIFY( (test_category<is_pod, int*>(true)) );
- VERIFY( (test_category<is_pod, int(*)(int)>(true)) );
- VERIFY( (test_category<is_pod, int (ClassType::*)>(true)) );
- VERIFY( (test_category<is_pod, int (ClassType::*) (int)>(true)) );
- VERIFY( (test_category<is_pod, int[2]>(true)) );
- VERIFY( (test_category<is_pod, float[][3]>(true)) );
- VERIFY( (test_category<is_pod, EnumType[2][3][4]>(true)) );
- VERIFY( (test_category<is_pod, int*[3]>(true)) );
- VERIFY( (test_category<is_pod, int(*[][2])(int)>(true)) );
- VERIFY( (test_category<is_pod, int (ClassType::*[2][3])>(true)) );
- VERIFY( (test_category<is_pod, int (ClassType::*[][2][3]) (int)>(true)) );
- VERIFY( (test_category<is_pod, ClassType>(true)) );
- VERIFY( (test_category<is_pod, PODType>(true)) );
-
- VERIFY( (test_category<is_pod, void>(false)) );
- VERIFY( (test_category<is_pod, NType>(false)) );
- VERIFY( (test_category<is_pod, TType>(false)) );
- VERIFY( (test_category<is_pod, SLType>(false)) );
-}
+ static_assert(test_category<is_pod, int>(true), "");
+ static_assert(test_category<is_pod, float>(true), "");
+ static_assert(test_category<is_pod, EnumType>(true), "");
+ static_assert(test_category<is_pod, int*>(true), "");
+ static_assert(test_category<is_pod, int(*)(int)>(true), "");
+ static_assert(test_category<is_pod, int (ClassType::*)>(true), "");
+ static_assert(test_category<is_pod, int (ClassType::*) (int)>(true), "");
+ static_assert(test_category<is_pod, int[2]>(true), "");
+ static_assert(test_category<is_pod, float[][3]>(true), "");
+ static_assert(test_category<is_pod, EnumType[2][3][4]>(true), "");
+ static_assert(test_category<is_pod, int*[3]>(true), "");
+ static_assert(test_category<is_pod, int(*[][2])(int)>(true), "");
+ static_assert(test_category<is_pod, int (ClassType::*[2][3])>(true), "");
+ static_assert(test_category<is_pod,
+ int (ClassType::*[][2][3]) (int)>(true), "");
+ static_assert(test_category<is_pod, ClassType>(true), "");
+ static_assert(test_category<is_pod, PODType>(true), "");
-int main()
-{
- test01();
- return 0;
+ static_assert(test_category<is_pod, void>(false), "");
+ static_assert(test_category<is_pod, NType>(false), "");
+ static_assert(test_category<is_pod, TType>(false), "");
+ static_assert(test_category<is_pod, SLType>(false), "");
}
diff --git a/libstdc++-v3/testsuite/20_util/is_reference/value.cc b/libstdc++-v3/testsuite/20_util/is_reference/value.cc
index 14958935df8..36c0c3530c2 100644
--- a/libstdc++-v3/testsuite/20_util/is_reference/value.cc
+++ b/libstdc++-v3/testsuite/20_util/is_reference/value.cc
@@ -1,4 +1,6 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+
// 2007-06-02 Paolo Carlini <pcarlini@suse.de>
//
// Copyright (C) 2007-2013 Free Software Foundation, Inc.
@@ -19,28 +21,21 @@
// <http://www.gnu.org/licenses/>.
#include <type_traits>
-#include <testsuite_hooks.h>
#include <testsuite_tr1.h>
void test01()
{
- bool test __attribute__((unused)) = true;
using std::is_reference;
using namespace __gnu_test;
- VERIFY( (test_category<is_reference, int&>(true)) );
- VERIFY( (test_category<is_reference, ClassType&>(true)) );
- VERIFY( (test_category<is_reference, int(&)(int)>(true)) );
- VERIFY( (test_category<is_reference, int&&>(true)) );
- VERIFY( (test_category<is_reference, ClassType&&>(true)) );
- VERIFY( (test_category<is_reference, int(&&)(int)>(true)) );
+ static_assert(test_category<is_reference, int&>(true), "");
+ static_assert(test_category<is_reference, ClassType&>(true), "");
+ static_assert(test_category<is_reference, int(&)(int)>(true), "");
+ static_assert(test_category<is_reference, int&&>(true), "");
+ static_assert(test_category<is_reference, ClassType&&>(true), "");
+ static_assert(test_category<is_reference, int(&&)(int)>(true), "");
// Sanity check.
- VERIFY( (test_category<is_reference, ClassType>(false)) );
+ static_assert(test_category<is_reference, ClassType>(false), "");
}
-int main()
-{
- test01();
- return 0;
-}
diff --git a/libstdc++-v3/testsuite/20_util/is_rvalue_reference/value.cc b/libstdc++-v3/testsuite/20_util/is_rvalue_reference/value.cc
index e89ae2cc6fb..45cf1476307 100644
--- a/libstdc++-v3/testsuite/20_util/is_rvalue_reference/value.cc
+++ b/libstdc++-v3/testsuite/20_util/is_rvalue_reference/value.cc
@@ -1,4 +1,6 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+
// 2007-06-02 Paolo Carlini <pcarlini@suse.de>
//
// Copyright (C) 2007-2013 Free Software Foundation, Inc.
@@ -19,26 +21,18 @@
// <http://www.gnu.org/licenses/>.
#include <type_traits>
-#include <testsuite_hooks.h>
#include <testsuite_tr1.h>
void test01()
{
- bool test __attribute__((unused)) = true;
using std::is_rvalue_reference;
using namespace __gnu_test;
- VERIFY( (test_category<is_rvalue_reference, int&&>(true)) );
- VERIFY( (test_category<is_rvalue_reference, ClassType&&>(true)) );
- VERIFY( (test_category<is_rvalue_reference, int(&&)(int)>(true)) );
+ static_assert(test_category<is_rvalue_reference, int&&>(true), "");
+ static_assert(test_category<is_rvalue_reference, ClassType&&>(true), "");
+ static_assert(test_category<is_rvalue_reference, int(&&)(int)>(true), "");
// Sanity check.
- VERIFY( (test_category<is_rvalue_reference, int&>(false)) );
- VERIFY( (test_category<is_rvalue_reference, ClassType>(false)) );
-}
-
-int main()
-{
- test01();
- return 0;
+ static_assert(test_category<is_rvalue_reference, int&>(false), "");
+ static_assert(test_category<is_rvalue_reference, ClassType>(false), "");
}
diff --git a/libstdc++-v3/testsuite/20_util/is_scalar/value.cc b/libstdc++-v3/testsuite/20_util/is_scalar/value.cc
index 05238e14023..7e37565860b 100644
--- a/libstdc++-v3/testsuite/20_util/is_scalar/value.cc
+++ b/libstdc++-v3/testsuite/20_util/is_scalar/value.cc
@@ -1,4 +1,6 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+
// 2010-11-30 Paolo Carlini <paolo.carlini@oracle.com>
//
// Copyright (C) 2010-2013 Free Software Foundation, Inc.
@@ -19,30 +21,22 @@
// <http://www.gnu.org/licenses/>.
#include <type_traits>
-#include <testsuite_hooks.h>
#include <testsuite_tr1.h>
void test01()
{
- bool test __attribute__((unused)) = true;
using std::is_scalar;
using namespace __gnu_test;
- VERIFY( (test_category<is_scalar, int>(true)) );
- VERIFY( (test_category<is_scalar, float>(true)) );
- VERIFY( (test_category<is_scalar, EnumType>(true)) );
- VERIFY( (test_category<is_scalar, int*>(true)) );
- VERIFY( (test_category<is_scalar, int(*)(int)>(true)) );
- VERIFY( (test_category<is_scalar, int (ClassType::*)>(true)) );
- VERIFY( (test_category<is_scalar, int (ClassType::*) (int)>(true)) );
- VERIFY( (test_category<is_scalar, std::nullptr_t>(true)) );
+ static_assert(test_category<is_scalar, int>(true), "");
+ static_assert(test_category<is_scalar, float>(true), "");
+ static_assert(test_category<is_scalar, EnumType>(true), "");
+ static_assert(test_category<is_scalar, int*>(true), "");
+ static_assert(test_category<is_scalar, int(*)(int)>(true), "");
+ static_assert(test_category<is_scalar, int (ClassType::*)>(true), "");
+ static_assert(test_category<is_scalar, int (ClassType::*) (int)>(true), "");
+ static_assert(test_category<is_scalar, std::nullptr_t>(true), "");
// Sanity check.
- VERIFY( (test_category<is_scalar, ClassType>(false)) );
-}
-
-int main()
-{
- test01();
- return 0;
+ static_assert(test_category<is_scalar, ClassType>(false), "");
}
diff --git a/libstdc++-v3/testsuite/20_util/is_signed/value.cc b/libstdc++-v3/testsuite/20_util/is_signed/value.cc
index c01a52c1380..e72a4ef87b9 100644
--- a/libstdc++-v3/testsuite/20_util/is_signed/value.cc
+++ b/libstdc++-v3/testsuite/20_util/is_signed/value.cc
@@ -1,4 +1,6 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+
// 2005-01-24 Paolo Carlini <pcarlini@suse.de>
//
// Copyright (C) 2005-2013 Free Software Foundation, Inc.
@@ -19,52 +21,45 @@
// <http://www.gnu.org/licenses/>.
#include <type_traits>
-#include <testsuite_hooks.h>
#include <testsuite_tr1.h>
void test01()
{
- bool test __attribute__((unused)) = true;
using std::is_signed;
using namespace __gnu_test;
- VERIFY( (test_category<is_signed, void>(false)) );
+ static_assert(test_category<is_signed, void>(false), "");
- VERIFY( (test_category<is_signed, char>(char(-1) < char(0))) );
- VERIFY( (test_category<is_signed, signed char>(true)) );
- VERIFY( (test_category<is_signed, unsigned char>(false)) );
+ static_assert(test_category<is_signed, char>(char(-1) < char(0)), "");
+ static_assert(test_category<is_signed, signed char>(true), "");
+ static_assert(test_category<is_signed, unsigned char>(false), "");
#ifdef _GLIBCXX_USE_WCHAR_T
- VERIFY( (test_category<is_signed, wchar_t>(wchar_t(-1) < wchar_t(0))) );
+ static_assert(test_category<is_signed, wchar_t>
+ (wchar_t(-1) < wchar_t(0)), "");
#endif
- VERIFY( (test_category<is_signed, short>(true)) );
- VERIFY( (test_category<is_signed, unsigned short>(false)) );
- VERIFY( (test_category<is_signed, int>(true)) );
- VERIFY( (test_category<is_signed, unsigned int>(false)) );
- VERIFY( (test_category<is_signed, long>(true)) );
- VERIFY( (test_category<is_signed, unsigned long>(false)) );
- VERIFY( (test_category<is_signed, long long>(true)) );
- VERIFY( (test_category<is_signed, unsigned long long>(false)) );
+ static_assert(test_category<is_signed, short>(true), "");
+ static_assert(test_category<is_signed, unsigned short>(false), "");
+ static_assert(test_category<is_signed, int>(true), "");
+ static_assert(test_category<is_signed, unsigned int>(false), "");
+ static_assert(test_category<is_signed, long>(true), "");
+ static_assert(test_category<is_signed, unsigned long>(false), "");
+ static_assert(test_category<is_signed, long long>(true), "");
+ static_assert(test_category<is_signed, unsigned long long>(false), "");
- VERIFY( (test_category<is_signed, float>(true)) );
- VERIFY( (test_category<is_signed, double>(true)) );
- VERIFY( (test_category<is_signed, long double>(true)) );
+ static_assert(test_category<is_signed, float>(true), "");
+ static_assert(test_category<is_signed, double>(true), "");
+ static_assert(test_category<is_signed, long double>(true), "");
// GNU Extensions.
#ifdef _GLIBCXX_USE_INT128
- VERIFY( (test_category<is_signed, __int128>(true)) );
- VERIFY( (test_category<is_signed, unsigned __int128>(false)) );
+ static_assert(test_category<is_signed, __int128>(true), "");
+ static_assert(test_category<is_signed, unsigned __int128>(false), "");
#endif
#ifdef _GLIBCXX_USE_FLOAT128
- VERIFY( (test_category<is_signed, __float128>(true)) );
+ static_assert(test_category<is_signed, __float128>(true), "");
#endif
// Sanity check.
- VERIFY( (test_category<is_signed, ClassType>(false)) );
-}
-
-int main()
-{
- test01();
- return 0;
+ static_assert(test_category<is_signed, ClassType>(false), "");
}
diff --git a/libstdc++-v3/testsuite/20_util/is_standard_layout/value.cc b/libstdc++-v3/testsuite/20_util/is_standard_layout/value.cc
index ad1eacc9deb..7bb417c8893 100644
--- a/libstdc++-v3/testsuite/20_util/is_standard_layout/value.cc
+++ b/libstdc++-v3/testsuite/20_util/is_standard_layout/value.cc
@@ -1,4 +1,6 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+
// 2010-03-23 Paolo Carlini <paolo.carlini@oracle.com>
//
// Copyright (C) 2010-2013 Free Software Foundation, Inc.
@@ -19,24 +21,16 @@
// <http://www.gnu.org/licenses/>.
#include <type_traits>
-#include <testsuite_hooks.h>
#include <testsuite_tr1.h>
void test01()
{
- bool test __attribute__((unused)) = true;
using std::is_standard_layout;
using namespace __gnu_test;
- VERIFY( (test_category<is_standard_layout, SLType>(true)) );
- VERIFY( (test_category<is_standard_layout, PODType>(true)) );
-
- VERIFY( (test_category<is_standard_layout, NType>(false)) );
- VERIFY( (test_category<is_standard_layout, TType>(false)) );
-}
+ static_assert(test_category<is_standard_layout, SLType>(true), "");
+ static_assert(test_category<is_standard_layout, PODType>(true), "");
-int main()
-{
- test01();
- return 0;
+ static_assert(test_category<is_standard_layout, NType>(false), "");
+ static_assert(test_category<is_standard_layout, TType>(false), "");
}
diff --git a/libstdc++-v3/testsuite/20_util/is_trivial/value.cc b/libstdc++-v3/testsuite/20_util/is_trivial/value.cc
index f24fde5fbb9..1798dfb5283 100644
--- a/libstdc++-v3/testsuite/20_util/is_trivial/value.cc
+++ b/libstdc++-v3/testsuite/20_util/is_trivial/value.cc
@@ -1,4 +1,6 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+
// 2010-03-23 Paolo Carlini <paolo.carlini@oracle.com>
//
// Copyright (C) 2010-2013 Free Software Foundation, Inc.
@@ -19,24 +21,16 @@
// <http://www.gnu.org/licenses/>.
#include <type_traits>
-#include <testsuite_hooks.h>
#include <testsuite_tr1.h>
void test01()
{
- bool test __attribute__((unused)) = true;
using std::is_trivial;
using namespace __gnu_test;
- VERIFY( (test_category<is_trivial, TType>(true)) );
- VERIFY( (test_category<is_trivial, PODType>(true)) );
-
- VERIFY( (test_category<is_trivial, NType>(false)) );
- VERIFY( (test_category<is_trivial, SLType>(false)) );
-}
+ static_assert(test_category<is_trivial, TType>(true), "");
+ static_assert(test_category<is_trivial, PODType>(true), "");
-int main()
-{
- test01();
- return 0;
+ static_assert(test_category<is_trivial, NType>(false), "");
+ static_assert(test_category<is_trivial, SLType>(false), "");
}
diff --git a/libstdc++-v3/testsuite/20_util/is_trivially_destructible/value.cc b/libstdc++-v3/testsuite/20_util/is_trivially_destructible/value.cc
index 0d9e7d31c94..23c64c476ab 100644
--- a/libstdc++-v3/testsuite/20_util/is_trivially_destructible/value.cc
+++ b/libstdc++-v3/testsuite/20_util/is_trivially_destructible/value.cc
@@ -1,4 +1,5 @@
// { dg-options "-std=gnu++11" }
+// { dg-do compile }
//
// 2012-04-15 Paolo Carlini <paolo.carlini@oracle.com>
//
@@ -20,25 +21,17 @@
// <http://www.gnu.org/licenses/>.
#include <type_traits>
-#include <testsuite_hooks.h>
#include <testsuite_tr1.h>
void test01()
{
- bool test __attribute__((unused)) = true;
using std::is_trivially_destructible;
using namespace __gnu_test;
- VERIFY( (test_category<is_trivially_destructible, int>(true)) );
- VERIFY( (test_category<is_trivially_destructible, TType>(true)) );
- VERIFY( (test_category<is_trivially_destructible, PODType>(true)) );
+ static_assert(test_category<is_trivially_destructible, int>(true), "");
+ static_assert(test_category<is_trivially_destructible, TType>(true), "");
+ static_assert(test_category<is_trivially_destructible, PODType>(true), "");
- VERIFY( (test_category<is_trivially_destructible, NType>(false)) );
- VERIFY( (test_category<is_trivially_destructible, SLType>(false)) );
-}
-
-int main()
-{
- test01();
- return 0;
+ static_assert(test_category<is_trivially_destructible, NType>(false), "");
+ static_assert(test_category<is_trivially_destructible, SLType>(false), "");
}
diff --git a/libstdc++-v3/testsuite/20_util/is_unsigned/value.cc b/libstdc++-v3/testsuite/20_util/is_unsigned/value.cc
index 9cf89776d1a..7c9fea3c9b8 100644
--- a/libstdc++-v3/testsuite/20_util/is_unsigned/value.cc
+++ b/libstdc++-v3/testsuite/20_util/is_unsigned/value.cc
@@ -1,4 +1,6 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+
// 2005-01-24 Paolo Carlini <pcarlini@suse.de>
//
// Copyright (C) 2005-2013 Free Software Foundation, Inc.
@@ -19,52 +21,45 @@
// <http://www.gnu.org/licenses/>.
#include <type_traits>
-#include <testsuite_hooks.h>
#include <testsuite_tr1.h>
void test01()
{
- bool test __attribute__((unused)) = true;
using std::is_unsigned;
using namespace __gnu_test;
+
+ static_assert(test_category<is_unsigned, void>(false), "");
- VERIFY( (test_category<is_unsigned, void>(false)) );
-
- VERIFY( (test_category<is_unsigned, char>(char(-1) > char(0))) );
- VERIFY( (test_category<is_unsigned, signed char>(false)) );
- VERIFY( (test_category<is_unsigned, unsigned char>(true)) );
+ static_assert(test_category<is_unsigned, char>(char(-1) > char(0)), "");
+ static_assert(test_category<is_unsigned, signed char>(false), "");
+ static_assert(test_category<is_unsigned, unsigned char>(true), "");
#ifdef _GLIBCXX_USE_WCHAR_T
- VERIFY( (test_category<is_unsigned, wchar_t>(wchar_t(-1) > wchar_t(0))) );
+ static_assert(test_category<is_unsigned, wchar_t>
+ (wchar_t(-1) > wchar_t(0)), "");
#endif
- VERIFY( (test_category<is_unsigned, short>(false)) );
- VERIFY( (test_category<is_unsigned, unsigned short>(true)) );
- VERIFY( (test_category<is_unsigned, int>(false)) );
- VERIFY( (test_category<is_unsigned, unsigned int>(true)) );
- VERIFY( (test_category<is_unsigned, long>(false)) );
- VERIFY( (test_category<is_unsigned, unsigned long>(true)) );
- VERIFY( (test_category<is_unsigned, long long>(false)) );
- VERIFY( (test_category<is_unsigned, unsigned long long>(true)) );
+ static_assert(test_category<is_unsigned, short>(false), "");
+ static_assert(test_category<is_unsigned, unsigned short>(true), "");
+ static_assert(test_category<is_unsigned, int>(false), "");
+ static_assert(test_category<is_unsigned, unsigned int>(true), "");
+ static_assert(test_category<is_unsigned, long>(false), "");
+ static_assert(test_category<is_unsigned, unsigned long>(true), "");
+ static_assert(test_category<is_unsigned, long long>(false), "");
+ static_assert(test_category<is_unsigned, unsigned long long>(true), "");
- VERIFY( (test_category<is_unsigned, float>(false)) );
- VERIFY( (test_category<is_unsigned, double>(false)) );
- VERIFY( (test_category<is_unsigned, long double>(false)) );
+ static_assert(test_category<is_unsigned, float>(false), "");
+ static_assert(test_category<is_unsigned, double>(false), "");
+ static_assert(test_category<is_unsigned, long double>(false), "");
// GNU Extensions.
#ifdef _GLIBCXX_USE_INT128
- VERIFY( (test_category<is_unsigned, unsigned __int128>(true)) );
- VERIFY( (test_category<is_unsigned, __int128>(false)) );
+ static_assert(test_category<is_unsigned, unsigned __int128>(true), "");
+ static_assert(test_category<is_unsigned, __int128>(false), "");
#endif
#ifdef _GLIBCXX_USE_FLOAT128
- VERIFY( (test_category<is_unsigned, __float128>(false)) );
+ static_assert(test_category<is_unsigned, __float128>(false), "");
#endif
// Sanity check.
- VERIFY( (test_category<is_unsigned, ClassType>(false)) );
-}
-
-int main()
-{
- test01();
- return 0;
+ static_assert(test_category<is_unsigned, ClassType>(false), "");
}
diff --git a/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs-2.cc b/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs-2.cc
index 012e2e32dc7..86097bb70ec 100644
--- a/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs-2.cc
+++ b/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs-2.cc
@@ -1,5 +1,6 @@
// { dg-options "-std=gnu++0x -funsigned-char -fshort-enums" }
// { dg-options "-std=gnu++0x -funsigned-char -fshort-enums -Wl,--no-enum-size-warning" { target arm*-*-linux-* } }
+// { dg-do compile }
// 2007-05-03 Benjamin Kosnik <bkoz@redhat.com>
//
@@ -21,53 +22,46 @@
// <http://www.gnu.org/licenses/>.
#include <type_traits>
-#include <testsuite_hooks.h>
// Ensure that this enum has "short" as its underlying type.
enum test_enum { first_selection = ((unsigned char)-1) + 1 };
void test01()
{
- bool test __attribute__((unused)) = true;
using std::make_signed;
using std::is_same;
// Positive tests.
typedef make_signed<const int>::type test2_type;
- VERIFY( (is_same<test2_type, const int>::value) );
+ static_assert(is_same<test2_type, const int>::value, "");
typedef make_signed<const unsigned int>::type test21c_type;
- VERIFY( (is_same<test21c_type, const signed int>::value) );
+ static_assert(is_same<test21c_type, const signed int>::value, "");
typedef make_signed<volatile unsigned int>::type test21v_type;
- VERIFY( (is_same<test21v_type, volatile signed int>::value) );
+ static_assert(is_same<test21v_type, volatile signed int>::value, "");
typedef make_signed<const volatile unsigned int>::type test21cv_type;
- VERIFY( (is_same<test21cv_type, const volatile signed int>::value) );
+ static_assert(is_same<test21cv_type,
+ const volatile signed int>::value, "");
typedef make_signed<const char>::type test22_type;
- VERIFY( (is_same<test22_type, const signed char>::value) );
+ static_assert(is_same<test22_type, const signed char>::value, "");
#ifdef _GLIBCXX_USE_WCHAR_T
typedef make_signed<volatile wchar_t>::type test23_type;
- VERIFY( (is_same<test23_type, volatile signed wchar_t>::value) );
+ static_assert(is_same<test23_type, volatile signed wchar_t>::value, "");
#endif
typedef make_signed<test_enum>::type test24_type;
- VERIFY( (is_same<test24_type, short>::value) );
+ static_assert(is_same<test24_type, short>::value, "");
// GNU Extensions.
#ifdef _GLIBCXX_USE_INT128
typedef make_signed<unsigned __int128>::type test25_type;
- VERIFY( (is_same<test25_type, __int128>::value) );
+ static_assert(is_same<test25_type, __int128>::value, "");
typedef make_signed<__int128>::type test26_type;
- VERIFY( (is_same<test26_type, __int128>::value) );
+ static_assert(is_same<test26_type, __int128>::value, "");
#endif
}
-
-int main()
-{
- test01();
- return 0;
-}
diff --git a/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-1.cc b/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-1.cc
index 57474b5b085..e6d66dcf9be 100644
--- a/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-1.cc
+++ b/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-1.cc
@@ -1,4 +1,5 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
// 2007-05-03 Benjamin Kosnik <bkoz@redhat.com>
//
@@ -20,56 +21,49 @@
// <http://www.gnu.org/licenses/>.
#include <type_traits>
-#include <testsuite_hooks.h>
enum test_enum { first_selection };
void test01()
{
- bool test __attribute__((unused)) = true;
using std::make_unsigned;
using std::is_same;
using std::is_unsigned;
// Positive tests.
typedef make_unsigned<const unsigned int>::type test2_type;
- VERIFY( (is_same<test2_type, const unsigned int>::value) );
+ static_assert(is_same<test2_type, const unsigned int>::value, "");
typedef make_unsigned<const signed int>::type test21c_type;
- VERIFY( (is_same<test21c_type, const unsigned int>::value) );
+ static_assert(is_same<test21c_type, const unsigned int>::value, "");
typedef make_unsigned<volatile signed int>::type test21v_type;
- VERIFY( (is_same<test21v_type, volatile unsigned int>::value) );
+ static_assert(is_same<test21v_type, volatile unsigned int>::value, "");
typedef make_unsigned<const volatile signed int>::type test21cv_type;
- VERIFY( (is_same<test21cv_type, const volatile unsigned int>::value) );
+ static_assert(is_same<test21cv_type,
+ const volatile unsigned int>::value, "");
typedef make_unsigned<const char>::type test22_type;
- VERIFY( (is_same<test22_type, const unsigned char>::value) );
+ static_assert(is_same<test22_type, const unsigned char>::value, "");
#ifdef _GLIBCXX_USE_WCHAR_T
typedef make_unsigned<volatile wchar_t>::type test23_type;
- VERIFY( (is_same<test23_type, volatile wchar_t>::value) );
+ static_assert(is_same<test23_type, volatile wchar_t>::value, "");
#endif
// Chapter 48, chapter 20. Smallest rank such that new unsigned type
// same size.
typedef make_unsigned<test_enum>::type test24_type;
- VERIFY( is_unsigned<test24_type>::value );
- VERIFY( sizeof(test24_type) == sizeof(test_enum) );
+ static_assert(is_unsigned<test24_type>::value, "");
+ static_assert(sizeof(test24_type) == sizeof(test_enum), "");
// GNU Extensions.
#ifdef _GLIBCXX_USE_INT128
typedef make_unsigned<unsigned __int128>::type test25_type;
- VERIFY( (is_same<test25_type, unsigned __int128>::value) );
+ static_assert(is_same<test25_type, unsigned __int128>::value, "");
typedef make_unsigned<__int128>::type test26_type;
- VERIFY( (is_same<test26_type, unsigned __int128>::value) );
+ static_assert(is_same<test26_type, unsigned __int128>::value, "");
#endif
}
-
-int main()
-{
- test01();
- return 0;
-}
diff --git a/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-2.cc b/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-2.cc
index da83d974d7c..41119be1fbb 100644
--- a/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-2.cc
+++ b/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-2.cc
@@ -1,5 +1,6 @@
-// { dg-options "-std=gnu++0x -funsigned-char -fshort-enums" }
-// { dg-options "-std=gnu++0x -funsigned-char -fshort-enums -Wl,--no-enum-size-warning" { target arm*-*-linux-* } }
+// { dg-options "-std=gnu++11 -funsigned-char -fshort-enums" }
+// { dg-options "-std=gnu++11 -funsigned-char -fshort-enums -Wl,--no-enum-size-warning" { target arm*-*-linux-* } }
+// { dg-do compile }
// 2007-05-03 Benjamin Kosnik <bkoz@redhat.com>
//
@@ -21,53 +22,46 @@
// <http://www.gnu.org/licenses/>.
#include <type_traits>
-#include <testsuite_hooks.h>
// Ensure that this enum has "short" as its underlying type.
enum test_enum { first_selection = ((unsigned char)-1) + 1 };
void test01()
{
- bool test __attribute__((unused)) = true;
using std::make_unsigned;
using std::is_same;
// Positive tests.
typedef make_unsigned<const unsigned int>::type test2_type;
- VERIFY( (is_same<test2_type, const unsigned int>::value) );
+ static_assert(is_same<test2_type, const unsigned int>::value, "");
typedef make_unsigned<const signed int>::type test21c_type;
- VERIFY( (is_same<test21c_type, const unsigned int>::value) );
+ static_assert(is_same<test21c_type, const unsigned int>::value, "");
typedef make_unsigned<volatile signed int>::type test21v_type;
- VERIFY( (is_same<test21v_type, volatile unsigned int>::value) );
+ static_assert(is_same<test21v_type, volatile unsigned int>::value, "");
typedef make_unsigned<const volatile signed int>::type test21cv_type;
- VERIFY( (is_same<test21cv_type, const volatile unsigned int>::value) );
+ static_assert(is_same<test21cv_type,
+ const volatile unsigned int>::value, "");
typedef make_unsigned<const char>::type test22_type;
- VERIFY( (is_same<test22_type, const unsigned char>::value) );
+ static_assert(is_same<test22_type, const unsigned char>::value, "");
#ifdef _GLIBCXX_USE_WCHAR_T
typedef make_unsigned<volatile wchar_t>::type test23_type;
- VERIFY( (is_same<test23_type, volatile wchar_t>::value) );
+ static_assert(is_same<test23_type, volatile wchar_t>::value, "");
#endif
typedef make_unsigned<test_enum>::type test24_type;
- VERIFY( (is_same<test24_type, unsigned short>::value) );
+ static_assert(is_same<test24_type, unsigned short>::value, "");
// GNU Extensions.
#ifdef _GLIBCXX_USE_INT128
typedef make_unsigned<unsigned __int128>::type test25_type;
- VERIFY( (is_same<test25_type, unsigned __int128>::value) );
+ static_assert(is_same<test25_type, unsigned __int128>::value, "");
typedef make_unsigned<__int128>::type test26_type;
- VERIFY( (is_same<test26_type, unsigned __int128>::value) );
+ static_assert(is_same<test26_type, unsigned __int128>::value, "");
#endif
}
-
-int main()
-{
- test01();
- return 0;
-}
diff --git a/libstdc++-v3/testsuite/20_util/remove_reference/value.cc b/libstdc++-v3/testsuite/20_util/remove_reference/value.cc
index 0210dfad1de..b66d27ee104 100644
--- a/libstdc++-v3/testsuite/20_util/remove_reference/value.cc
+++ b/libstdc++-v3/testsuite/20_util/remove_reference/value.cc
@@ -1,4 +1,6 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+
// 2007-06-02 Paolo Carlini <pcarlini@suse.de>
//
// Copyright (C) 2007-2013 Free Software Foundation, Inc.
@@ -19,34 +21,34 @@
// <http://www.gnu.org/licenses/>.
#include <type_traits>
-#include <testsuite_hooks.h>
#include <testsuite_tr1.h>
void test01()
{
- bool test __attribute__((unused)) = true;
using std::remove_reference;
using std::is_same;
using namespace __gnu_test;
- VERIFY( (is_same<remove_reference<int&>::type, int>::value) );
- VERIFY( (is_same<remove_reference<int>::type, int>::value) );
- VERIFY( (is_same<remove_reference<const int&>::type, const int>::value) );
- VERIFY( (is_same<remove_reference<int*&>::type, int*>::value) );
- VERIFY( (is_same<remove_reference<ClassType&>::type, ClassType>::value) );
- VERIFY( (is_same<remove_reference<ClassType>::type, ClassType>::value) );
- VERIFY( (is_same<remove_reference<int(&)(int)>::type, int(int)>::value) );
- VERIFY( (is_same<remove_reference<int&&>::type, int>::value) );
- VERIFY( (is_same<remove_reference<int>::type, int>::value) );
- VERIFY( (is_same<remove_reference<const int&&>::type, const int>::value) );
- VERIFY( (is_same<remove_reference<int*&&>::type, int*>::value) );
- VERIFY( (is_same<remove_reference<ClassType&&>::type, ClassType>::value) );
- VERIFY( (is_same<remove_reference<ClassType>::type, ClassType>::value) );
- VERIFY( (is_same<remove_reference<int(&&)(int)>::type, int(int)>::value) );
-}
-
-int main()
-{
- test01();
- return 0;
+ static_assert(is_same<remove_reference<int&>::type, int>::value, "");
+ static_assert(is_same<remove_reference<int>::type, int>::value, "");
+ static_assert(is_same<remove_reference<const int&>::type,
+ const int>::value, "");
+ static_assert(is_same<remove_reference<int*&>::type, int*>::value, "");
+ static_assert(is_same<remove_reference<ClassType&>::type,
+ ClassType>::value, "");
+ static_assert(is_same<remove_reference<ClassType>::type,
+ ClassType>::value, "");
+ static_assert(is_same<remove_reference<int(&)(int)>::type,
+ int(int)>::value, "");
+ static_assert(is_same<remove_reference<int&&>::type, int>::value, "");
+ static_assert(is_same<remove_reference<int>::type, int>::value, "");
+ static_assert(is_same<remove_reference<const int&&>::type,
+ const int>::value, "");
+ static_assert(is_same<remove_reference<int*&&>::type, int*>::value, "");
+ static_assert(is_same<remove_reference<ClassType&&>::type,
+ ClassType>::value, "");
+ static_assert(is_same<remove_reference<ClassType>::type,
+ ClassType>::value, "");
+ static_assert(is_same<remove_reference<int(&&)(int)>::type,
+ int(int)>::value, "");
}
diff --git a/libstdc++-v3/testsuite/util/testsuite_tr1.h b/libstdc++-v3/testsuite/util/testsuite_tr1.h
index b0d6e8c2f58..60d95ec6f0c 100644
--- a/libstdc++-v3/testsuite/util/testsuite_tr1.h
+++ b/libstdc++-v3/testsuite/util/testsuite_tr1.h
@@ -28,66 +28,68 @@ namespace __gnu_test
{
// For tr1/type_traits.
template<template<typename> class Category, typename Type>
+#if __cplusplus >= 201103L
+ constexpr
+#endif
bool
test_category(bool value)
{
- bool ret = true;
- ret &= Category<Type>::value == value;
- ret &= Category<const Type>::value == value;
- ret &= Category<volatile Type>::value == value;
- ret &= Category<const volatile Type>::value == value;
- ret &= Category<Type>::type::value == value;
- ret &= Category<const Type>::type::value == value;
- ret &= Category<volatile Type>::type::value == value;
- ret &= Category<const volatile Type>::type::value == value;
- return ret;
+ return (Category<Type>::value == value
+ && Category<const Type>::value == value
+ && Category<volatile Type>::value == value
+ && Category<const volatile Type>::value == value
+ && Category<Type>::type::value == value
+ && Category<const Type>::type::value == value
+ && Category<volatile Type>::type::value == value
+ && Category<const volatile Type>::type::value == value);
}
template<template<typename> class Property, typename Type>
+#if __cplusplus >= 201103L
+ constexpr
+#endif
bool
test_property(typename Property<Type>::value_type value)
{
- bool ret = true;
- ret &= Property<Type>::value == value;
- ret &= Property<Type>::type::value == value;
- return ret;
+ return (Property<Type>::value == value
+ && Property<Type>::type::value == value);
}
// For testing tr1/type_traits/extent, which has a second template
// parameter.
template<template<typename, unsigned> class Property,
typename Type, unsigned Uint>
+#if __cplusplus >= 201103L
+ constexpr
+#endif
bool
test_property(typename Property<Type, Uint>::value_type value)
{
- bool ret = true;
- ret &= Property<Type, Uint>::value == value;
- ret &= Property<Type, Uint>::type::value == value;
- return ret;
+ return (Property<Type, Uint>::value == value
+ && Property<Type, Uint>::type::value == value);
}
#if __cplusplus >= 201103L
template<template<typename...> class Property,
typename Type1, typename... Types>
- bool
+ constexpr bool
test_property(typename Property<Type1, Types...>::value_type value)
{
- bool ret = true;
- ret &= Property<Type1, Types...>::value == value;
- ret &= Property<Type1, Types...>::type::value == value;
- return ret;
+ return (Property<Type1, Types...>::value == value
+ && Property<Type1, Types...>::type::value == value);
}
#endif
template<template<typename, typename> class Relationship,
typename Type1, typename Type2>
+#if __cplusplus >= 201103L
+ constexpr
+#endif
bool
test_relationship(bool value)
{
- bool ret = true;
- ret &= Relationship<Type1, Type2>::value == value;
- ret &= Relationship<Type1, Type2>::type::value == value;
- return ret;
+ return (Relationship<Type1, Type2>::value == value
+ && Relationship<Type1, Type2>::type::value == value);
}
// Test types.