]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite_tr1.h (test_category, [...]): constexpr in c++11 mode.
authorPaolo Carlini <paolo.carlini@oracle.com>
Fri, 6 Dec 2013 23:08:41 +0000 (23:08 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Fri, 6 Dec 2013 23:08:41 +0000 (23:08 +0000)
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.

From-SVN: r205766

46 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/20_util/add_lvalue_reference/value.cc
libstdc++-v3/testsuite/20_util/add_rvalue_reference/value.cc
libstdc++-v3/testsuite/20_util/aligned_storage/value.cc
libstdc++-v3/testsuite/20_util/has_trivial_copy_assign/value.cc
libstdc++-v3/testsuite/20_util/has_trivial_copy_constructor/value.cc
libstdc++-v3/testsuite/20_util/has_trivial_default_constructor/value.cc
libstdc++-v3/testsuite/20_util/is_compound/value.cc
libstdc++-v3/testsuite/20_util/is_constructible/value.cc
libstdc++-v3/testsuite/20_util/is_convertible/value.cc
libstdc++-v3/testsuite/20_util/is_copy_assignable/value.cc
libstdc++-v3/testsuite/20_util/is_copy_constructible/value.cc
libstdc++-v3/testsuite/20_util/is_floating_point/value.cc
libstdc++-v3/testsuite/20_util/is_function/value.cc
libstdc++-v3/testsuite/20_util/is_fundamental/value.cc
libstdc++-v3/testsuite/20_util/is_integral/value.cc
libstdc++-v3/testsuite/20_util/is_literal_type/value.cc
libstdc++-v3/testsuite/20_util/is_lvalue_reference/value.cc
libstdc++-v3/testsuite/20_util/is_member_function_pointer/value.cc
libstdc++-v3/testsuite/20_util/is_member_object_pointer/value.cc
libstdc++-v3/testsuite/20_util/is_member_pointer/value.cc
libstdc++-v3/testsuite/20_util/is_move_assignable/value.cc
libstdc++-v3/testsuite/20_util/is_move_constructible/value.cc
libstdc++-v3/testsuite/20_util/is_nothrow_assignable/value.cc
libstdc++-v3/testsuite/20_util/is_nothrow_constructible/value.cc
libstdc++-v3/testsuite/20_util/is_nothrow_copy_assignable/value.cc
libstdc++-v3/testsuite/20_util/is_nothrow_copy_constructible/value.cc
libstdc++-v3/testsuite/20_util/is_nothrow_default_constructible/value.cc
libstdc++-v3/testsuite/20_util/is_nothrow_move_assignable/value.cc
libstdc++-v3/testsuite/20_util/is_nothrow_move_constructible/value.cc
libstdc++-v3/testsuite/20_util/is_null_pointer/value.cc
libstdc++-v3/testsuite/20_util/is_object/value.cc
libstdc++-v3/testsuite/20_util/is_pod/value.cc
libstdc++-v3/testsuite/20_util/is_reference/value.cc
libstdc++-v3/testsuite/20_util/is_rvalue_reference/value.cc
libstdc++-v3/testsuite/20_util/is_scalar/value.cc
libstdc++-v3/testsuite/20_util/is_signed/value.cc
libstdc++-v3/testsuite/20_util/is_standard_layout/value.cc
libstdc++-v3/testsuite/20_util/is_trivial/value.cc
libstdc++-v3/testsuite/20_util/is_trivially_destructible/value.cc
libstdc++-v3/testsuite/20_util/is_unsigned/value.cc
libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs-2.cc
libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-1.cc
libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-2.cc
libstdc++-v3/testsuite/20_util/remove_reference/value.cc
libstdc++-v3/testsuite/util/testsuite_tr1.h

index 912b89fd0d17fcc43a14b89774512f7b7a6a83c3..e437e5eecbcf6526a7b88b94ac8f84dcd0da869c 100644 (file)
@@ -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
index 152f03a6cb1434a4a5c5b0338a9931af5e9c3f57..ed862865146b2274cd451ad82018275fe40981e7 100644 (file)
@@ -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.
 // <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, "");
 }
index 7dcb1dcec986a3826bf3feaec56757c3985b10c6..468c438fdd1246c08cd560b8f41d23c26cb12db6 100644 (file)
@@ -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.
 // <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, "");  
 }
index adae72158d53a8f497ec57a956acab511d998757..4edbdbed7930b09335ec7bed2961065517daa23b 100644 (file)
@@ -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.
 // <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, "");
 }
index cbb6a02c9f28659a00f207891516c272a1233798..3e7568d0bb0428077809979875a21b14113afa52 100644 (file)
@@ -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.
 // <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), "");
 }
index a103a3c2f92a1a2c4a77bae615317c8ec86d0c94..5e91308de50f6dc2c2fb290bb0f865bba18226fb 100644 (file)
@@ -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.
 // 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), "");  
 }
index 8bc930cfdd66762404e78b4a2cef6ad989b58424..c04908633a73f4bd55dccb819bf427b0b1e49818 100644 (file)
@@ -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.
 // 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), "");  
 }
index 936b73666636a334c9d4a53dadecaa8d60fe1cbe..ac04f55081f3eb4c85e190629f86f18f4bc9deb9 100644 (file)
@@ -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.
 //
 // <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), "");
 }
index 25810f0bfdce191b4f65059d5a898b9622e62204..bfd9f144e3406c8982b95e0d8d768cfe28b3b84d 100644 (file)
@@ -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
 // <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), "");
 }
index 000458a2955430dd326f8cd7f82edb047b530389..97518a4dd2aea2d461e5e1cfee7c3ebf26fcf3bb 100644 (file)
@@ -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>
 //
 // <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), "");
 }
index af5e3ba777a9739f9e3428881f8fbd2fda15e88c..4cc12d6e521de0149db2d74df4ea3470279d0d3b 100644 (file)
@@ -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.
 // <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), "");
 }
index 0a9686d67e1754c61607b58c59bc120d8d438120..d05c21243fcbc3fc3fe3014d340e1ec1bc610e8b 100644 (file)
@@ -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.
 //
 // <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), "");
 }
index 104775c5adee3f7ad1c0c06d787e8efb21cf73ec..d77687edce185394d097a8ed9e7818e1ff24a96c 100644 (file)
@@ -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.
 //
 // <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), "");
 }
index ce52ac9872d1e865fe81a4585297ee582e3c41fc..c38a3a1e7a16419f279c07cdcde5d8e7e4e54f5a 100644 (file)
@@ -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.
 //
 // <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), "");
 }
index 00fa8822d389fbab646f199d2e1528dded448c2e..b6ba4d09c7ea2e8d644594aaa94c8d5a4a2d2813 100644 (file)
@@ -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.
 //
 // <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), "");
 }
index ff919d48c9505ccfdd85a547d95fee929737336e..0ebc91b8d05ed7f3fa04e89513fdd01203740a74 100644 (file)
@@ -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.
 // <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), "");
 }
index 067ff766f68bfdb479f03006c40686aca22a8b70..703707c3b2b9a5ae6aae72fe1e5753bd39203f6b 100644 (file)
@@ -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.
 // <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), "");
 }
index 6b117d81d1fa45437f96b3c731cf3988d64deaa2..d084fd97323b0f3f4f480bab531b1a6ee7918f1c 100644 (file)
@@ -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.
 // <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;
-}
index 36d2abbaebfce36939e03fc956cd75dce1a9f2b1..78da4749dfb96a18718c945040492139860f7e0b 100644 (file)
@@ -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.
 //
 // <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), "");
 }
index e451c1b094d08530c5611b0798e4fd387016604d..88eb561aa9371ad17bdd3370777ea8537879408f 100644 (file)
@@ -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.
 //
 // <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()
index 3adc1d494b46fc10a22ee2cc68673d01e9b7554f..c74c9820d282220ea4829af32308222579104609 100644 (file)
@@ -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.
 //
 // <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), "");
 }
index c96f739a63550ea8af33a2c3bc3b12d9a1485859..bd7699af167041e73c79389e63bd8f3997849820 100644 (file)
@@ -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.
 // <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), "");
 }
index 94af3e1ba14d16d92a71f7162afb20d98b05e419..b483eb029a3e4548b69835c47478b355995710cd 100644 (file)
@@ -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.
 //
 // <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), "");
 }
index 1ea87e71dffc0b6a9a7f74146abc98243937ae00..ae4b4e049d459ad66347d4d98615b453d423e3be 100644 (file)
@@ -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.
 // <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), "");
 }
index 0488ae37f5aaa0d1d1d7082b4f1f1a47cb2c9d69..f5fdddf4c9fd837b4e6fe1be6c94dbfc09f7ba8d 100644 (file)
@@ -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>
 
 // <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), "");
 }
index 72ce0a069f1c11768fef5408aa176ee0be0dac0e..c787e4b5d592a81f01d1c9b144c5d0e8aa94ce9d 100644 (file)
@@ -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.
 // <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), "");
 }
index 33d82af54e95e3e047f6d1728a9df0657ea5dbc1..8b7d324a3fbd4457c426e1e5b5d5068c6b2ee560 100644 (file)
@@ -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.
 // <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), "");
 }
index e04ff0c8c5ca3febf0cb87cf98ed23e642173a7f..10ee4a474bf984de5b557fdba263d6d1920a4209 100644 (file)
@@ -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.
 // <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), "");
 }
index 54d94c2f234629e5fd578c5b841f157a6ade28d8..a7251a9e0f4a7441d42087904deb06fccdcbed12 100644 (file)
@@ -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.
 // <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), "");
 }
index 9afe428f7658f517c85c2b3e60264df3b1b41a0a..868e4e7b377fb2d791f95b9407fc1be60cf6ef27 100644 (file)
@@ -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.
 //
 // <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), "");
 }
index 2bee73a6a0b0baadf7b563d8d6108930e823dcff..b4e2fa7ea316f1363233479e48cb684d319b30d4 100644 (file)
@@ -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.
 // <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), "");
 }
index 458d11d83fb6ffe659b39e75d7c640b4c79b3596..be35fb2eef155065fe8fd4d2f87eccf07f4fbeb7 100644 (file)
@@ -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.
 //
 // <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), "");
 }
index ee9bb522dceb55e4b56d3913923deb95c87b05b9..93bcc040a4df52a18a3d0b70f2ede6e62fcb3751 100644 (file)
@@ -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.
 // <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), "");
 }
index 14958935df8b73f1f0f72f025930c6a558cb3c7e..36c0c3530c20644556a0e4762b0faa2c15413fde 100644 (file)
@@ -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.
 // <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;
-}
index e89ae2cc6fbc612f8b63393f66dcd03105e7ff5b..45cf1476307b0c5b937dee16afa5705f3626c421 100644 (file)
@@ -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.
 // <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), "");
 }
index 05238e14023c3bb3fd4accd1cc93d1c086568a6c..7e37565860bce5bb07329761250579290ff8418b 100644 (file)
@@ -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.
 // <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), "");
 }
index c01a52c138076170d08186d744a03cc8190d895e..e72a4ef87b9fbf7d741e04b02c82b580e82ed8ba 100644 (file)
@@ -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.
 // <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), "");
 }
index ad1eacc9deb792dfe6683931a9d0ca9057e311a8..7bb417c889392fe11d3e7c95ee28e3766d5f759f 100644 (file)
@@ -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.
 // <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), "");
 }
index f24fde5fbb911380986b2f22a6a6f04447bed4dd..1798dfb528362959a83572ad7d7a9b3502e300bd 100644 (file)
@@ -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.
 // <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), "");
 }
index 0d9e7d31c94c722515ffaaef004d1f3887f466b8..23c64c476ab4b60fc682d3f3cf3e7f9fe23bcf9c 100644 (file)
@@ -1,4 +1,5 @@
 // { dg-options "-std=gnu++11" }
+// { dg-do compile }
 //
 // 2012-04-15  Paolo Carlini  <paolo.carlini@oracle.com>
 //
 // <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), "");
 }
index 9cf89776d1ac8d91f8a8d128cf856dad4b5c68f1..7c9fea3c9b8403b6bbfee574cbc997ae4e2661f8 100644 (file)
@@ -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.
 // <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), "");
 }
index 012e2e32dc7d4f5cfb3f727843eaeb40bf367008..86097bb70eccaf92ec5dc1ee1215955befab93c3 100644 (file)
@@ -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>
 //
 // <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;
-}
index 57474b5b085139da370a942be8110aeaa405913f..e6d66dcf9bea37fb0fe4096ae7afa06d15894c26 100644 (file)
@@ -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>
 //
 // <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;
-}
index da83d974d7c68bc774e026208263a0bacc131ca5..41119be1fbbbd5a31148d96d5a52881899ab06d4 100644 (file)
@@ -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>
 //
 // <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;
-}
index 0210dfad1de4c0f885aa4dcf55866d768ee53231..b66d27ee104c27992697a58e803ea1d6638dc1bb 100644 (file)
@@ -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.
 // <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, "");
 }
index b0d6e8c2f58e30ce75df8d5e5dd15577006f170f..60d95ec6f0ca79f032126935ffd3c24d1b4f749b 100644 (file)
@@ -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.