re PR libstdc++/60132 (C++11: lack of is_trivially_copy_constructible)
authorJonathan Wakely <jwakely@redhat.com>
Thu, 8 Jan 2015 16:24:55 +0000 (16:24 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Thu, 8 Jan 2015 16:24:55 +0000 (16:24 +0000)
PR libstdc++/60132
* include/std/type_traits (has_trivial_default_constructor,
has_trivial_copy_constructor, has_trivial_copy_assign): Add deprecated
attribute.
* testsuite/20_util/has_trivial_copy_assign/requirements/
explicit_instantiation.cc: Use -Wno-deprecated.
* testsuite/20_util/has_trivial_copy_assign/requirements/typedefs.cc:
Likewise.
* testsuite/20_util/has_trivial_copy_assign/value.cc: Likewise.
* testsuite/20_util/has_trivial_copy_constructor/requirements/
explicit_instantiation.cc: Likewise.
* testsuite/20_util/has_trivial_copy_constructor/requirements/
typedefs.cc: Likewise.
* testsuite/20_util/has_trivial_copy_constructor/value.cc: Likewise.
* testsuite/20_util/has_trivial_default_constructor/requirements/
explicit_instantiation.c: Likewise.
* testsuite/20_util/has_trivial_default_constructor/requirements/
typedefs.cc: Likewise.
* testsuite/20_util/has_trivial_default_constructor/value.cc:
Likewise.
* testsuite/20_util/pair/requirements/dr801.cc: Replace deprecated
trait.
* testsuite/20_util/tuple/requirements/dr801.cc: Likewise.
* testsuite/util/testsuite_common_types.h: Likewise.

From-SVN: r219350

14 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/include/std/type_traits
libstdc++-v3/testsuite/20_util/has_trivial_copy_assign/requirements/explicit_instantiation.cc
libstdc++-v3/testsuite/20_util/has_trivial_copy_assign/requirements/typedefs.cc
libstdc++-v3/testsuite/20_util/has_trivial_copy_assign/value.cc
libstdc++-v3/testsuite/20_util/has_trivial_copy_constructor/requirements/explicit_instantiation.cc
libstdc++-v3/testsuite/20_util/has_trivial_copy_constructor/requirements/typedefs.cc
libstdc++-v3/testsuite/20_util/has_trivial_copy_constructor/value.cc
libstdc++-v3/testsuite/20_util/has_trivial_default_constructor/requirements/explicit_instantiation.cc
libstdc++-v3/testsuite/20_util/has_trivial_default_constructor/requirements/typedefs.cc
libstdc++-v3/testsuite/20_util/has_trivial_default_constructor/value.cc
libstdc++-v3/testsuite/20_util/pair/requirements/dr801.cc
libstdc++-v3/testsuite/20_util/tuple/requirements/dr801.cc
libstdc++-v3/testsuite/util/testsuite_common_types.h

index 7e2616549032a9d115fab5efe0d9585aa3e9251e..85b08fa4bd9edc5567de78eebf0403ffb85bab6c 100644 (file)
@@ -1,3 +1,30 @@
+2015-01-08  Jonathan Wakely  <jwakely@redhat.com>
+
+       PR libstdc++/60132
+       * include/std/type_traits (has_trivial_default_constructor,
+       has_trivial_copy_constructor, has_trivial_copy_assign): Add deprecated
+       attribute.
+       * testsuite/20_util/has_trivial_copy_assign/requirements/
+       explicit_instantiation.cc: Use -Wno-deprecated.
+       * testsuite/20_util/has_trivial_copy_assign/requirements/typedefs.cc:
+       Likewise.
+       * testsuite/20_util/has_trivial_copy_assign/value.cc: Likewise.
+       * testsuite/20_util/has_trivial_copy_constructor/requirements/
+       explicit_instantiation.cc: Likewise.
+       * testsuite/20_util/has_trivial_copy_constructor/requirements/
+       typedefs.cc: Likewise.
+       * testsuite/20_util/has_trivial_copy_constructor/value.cc: Likewise.
+       * testsuite/20_util/has_trivial_default_constructor/requirements/
+       explicit_instantiation.c: Likewise.
+       * testsuite/20_util/has_trivial_default_constructor/requirements/
+       typedefs.cc: Likewise.
+       * testsuite/20_util/has_trivial_default_constructor/value.cc:
+       Likewise.
+       * testsuite/20_util/pair/requirements/dr801.cc: Replace deprecated
+       trait.
+       * testsuite/20_util/tuple/requirements/dr801.cc: Likewise.
+       * testsuite/util/testsuite_common_types.h: Likewise.
+
 2015-01-08  Jonathan Wakely  <jwakely@redhat.com>
 
        * include/bits/hashtable_policy.h: Use __bool_constant.
index 4397c165e8dc0a3a725178138b21938352a619cc..03e198acd08957471d96cff63f960404ba10261f 100644 (file)
@@ -1382,19 +1382,19 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   template<typename _Tp>
     struct has_trivial_default_constructor
     : public integral_constant<bool, __has_trivial_constructor(_Tp)>
-    { };
+    { } _GLIBCXX_DEPRECATED;
 
   /// has_trivial_copy_constructor (temporary legacy)
   template<typename _Tp>
     struct has_trivial_copy_constructor
     : public integral_constant<bool, __has_trivial_copy(_Tp)>
-    { };
+    { } _GLIBCXX_DEPRECATED;
 
   /// has_trivial_copy_assign (temporary legacy)
   template<typename _Tp>
     struct has_trivial_copy_assign
     : public integral_constant<bool, __has_trivial_assign(_Tp)>
-    { };
+    { } _GLIBCXX_DEPRECATED;
 
   /// has_virtual_destructor
   template<typename _Tp>
index 19b4c9988e39994ff39b5f8f60e03a061a1fc918..1b2c02b4caf6b9dff0a00ead31a0b5a971a51eaa 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++11" }
+// { dg-options "-std=gnu++11 -Wno-deprecated" }
 // { dg-do compile }
 // 2010-06-08  Paolo Carlini  <paolo.carlini@oracle.com>
 
index 3044ec3849af4246223ec81a24e431e4b8039fb6..c5fd5ec55490d5e8ed2e110567067ad3b4d3cd0a 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++11" }
+// { dg-options "-std=gnu++11 -Wno-deprecated" }
 // 2010-06-08  Paolo Carlini  <paolo.carlini@oracle.com>
 //
 // Copyright (C) 2010-2015 Free Software Foundation, Inc.
index 1cfafaa697dd9eddc387e2eba358916250a63858..bd778ad075928c22fea33c8aba693956833f6c47 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++11" }
+// { dg-options "-std=gnu++11 -Wno-deprecated" }
 // { dg-do compile }
 
 // 2010-06-08  Paolo Carlini  <paolo.carlini@oracle.com>
index 0e28a4febc0828ccc4dc2ffe7bb5f6964fd478d2..65178525b1c89b258718edcfdb53d206f425d3ad 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++11" }
+// { dg-options "-std=gnu++11 -Wno-deprecated" }
 // { dg-do compile }
 // 2007-04-30 Benjamin Kosnik <bkoz@redhat.com>
 
index 1df20b7e6716ef6dcb1263e71d0dac2f4110e6e1..0eb1e39913c84c3c3b3790816f43b4d1b610cbf2 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++11" }
+// { dg-options "-std=gnu++11 -Wno-deprecated" }
 // 2004-12-30  Paolo Carlini  <pcarlini@suse.de>
 //
 // Copyright (C) 2004-2015 Free Software Foundation, Inc.
index 2848e42d36abe1a6ed8c6f635ebaedf104d930f6..ea58a22f2f180a063d2c0b707082758e5bd32caa 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++11" }
+// { dg-options "-std=gnu++11 -Wno-deprecated" }
 // { dg-do compile }
 
 // 2004-12-30  Paolo Carlini  <pcarlini@suse.de>
index 0bb4ab91f316908fb384f5900587801fb65149a6..66d72d9b9eb71a9b93082836d509399055f94b37 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++11" }
+// { dg-options "-std=gnu++11 -Wno-deprecated" }
 // { dg-do compile }
 // 2007-04-30 Benjamin Kosnik <bkoz@redhat.com>
 
index 806b66cebff7023dfc9af359e507a6a1be4c425b..8eb7dc5cf9db2ae9bfa124d2815e2ac7db507652 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++11" }
+// { dg-options "-std=gnu++11 -Wno-deprecated" }
 // 2004-12-26  Paolo Carlini  <pcarlini@suse.de>
 //
 // Copyright (C) 2004-2015 Free Software Foundation, Inc.
index 669c7e0ab5a5743654b8bd209b19472609260c92..7111274400600e9fa94e6ce5f650c2523cd1c92c 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++11" }
+// { dg-options "-std=gnu++11 -Wno-deprecated" }
 // { dg-do compile }
 
 // 2004-12-26  Paolo Carlini  <pcarlini@suse.de>
index f44774c6355766d85d57086477c55adc89a72011..408ac5da5198b28d98dedf4ba65dd732b7eed27b 100644 (file)
@@ -27,7 +27,7 @@ void test_trivial()
   // PODType, TType, NType, SLType, LType, NLType, LTypeDerived
   typedef std::pair<int, int> pair_type;
   // static_assert(std::is_literal_type<pair_type>::value, "! literal");
-  static_assert(std::has_trivial_copy_constructor<pair_type>::value,
+  static_assert(std::is_trivially_copy_constructible<pair_type>::value,
                "! triv copy");
   static_assert(std::is_trivially_destructible<pair_type>::value,
                "! triv destructor");
index d8992c1ba1217e8da8c0ee21852cbab6c04ce9b6..c9358eef5c972dea0e863414d5372d02eaee54be 100644 (file)
@@ -27,7 +27,7 @@ void test_trivial()
   // PODType, TType, NType, SLType, LType, NLType, LTypeDerived
   typedef std::tuple<int, int> tuple_type;
   // static_assert(std::is_literal_type<tuple_type>::value, "! literal");
-  static_assert(std::has_trivial_copy_constructor<tuple_type>::value,
+  static_assert(std::is_trivially_copy_constructible<tuple_type>::value,
                "! triv copy");
   static_assert(std::is_trivially_destructible<tuple_type>::value,
                "! triv destructor");
index bb3d99a0f77a4de5edc31485632d43fda9aaa946..a5491e2773acaa216f820f2c7463b144265a2f6d 100644 (file)
@@ -545,7 +545,7 @@ namespace __gnu_test
        {
          void __constraint()
          {
-           typedef std::has_trivial_default_constructor<_Tp> ctor_p;
+           typedef std::is_trivially_default_constructible<_Tp> ctor_p;
            static_assert(ctor_p::value, "default constructor not trivial");
 
            typedef std::is_trivially_destructible<_Tp> dtor_p;