Fix testsuite to not increment bool
authorJonathan Wakely <jwakely@redhat.com>
Thu, 15 Sep 2016 10:18:38 +0000 (11:18 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Thu, 15 Sep 2016 10:18:38 +0000 (11:18 +0100)
* testsuite/23_containers/vector/debug/insert6_neg.cc: Remove
-Wno-deprecated.
* testsuite/util/debug/checks.h (generate_unique<bool>): Specialize.

From-SVN: r240157

libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/23_containers/vector/debug/insert6_neg.cc
libstdc++-v3/testsuite/util/debug/checks.h

index cb6e964f69a910ce5160d6083d41c486ab38e896..1b22ebba544d8433df718542b69267e05aa08bf4 100644 (file)
@@ -1,3 +1,9 @@
+2016-09-15  Jonathan Wakely  <jwakely@redhat.com>
+
+       * testsuite/23_containers/vector/debug/insert6_neg.cc: Remove
+       -Wno-deprecated.
+       * testsuite/util/debug/checks.h (generate_unique<bool>): Specialize.
+
 2016-09-14  Marek Polacek  <polacek@redhat.com>
 
        * testsuite/23_containers/vector/debug/insert6_neg.cc: Use
index c939c2203fc0466735c8b11e2539afce0092d23d..9893293613f651080d0048036d6295eb721f457a 100644 (file)
@@ -16,7 +16,6 @@
 // <http://www.gnu.org/licenses/>.
 //
 // { dg-do run { xfail *-*-* } }
-// { dg-options "-Wno-deprecated" }
 
 #include <vector>
 #include <debug/vector>
index 5a40608acaaf7b9ac204fd492eba0640a0b64903..872fa1a5fe4d5c31572e3c03ad90bd196e3f73e3 100644 (file)
@@ -53,6 +53,19 @@ namespace __gnu_test
       }
     };
 
+  template<>
+    struct generate_unique<bool>
+    {
+      typedef bool value_type;
+
+      value_type build()
+      {
+       static value_type _S_;
+       _S_ = !_S_;
+       return _S_;
+      }
+    };
+
   template<typename _Tp1, typename _Tp2>
     struct generate_unique<std::pair<_Tp1, _Tp2> >
     {