re PR c++/67216 (false is still a null pointer constant)
authorJonathan Wakely <jwakely@redhat.com>
Tue, 18 Aug 2015 18:04:48 +0000 (19:04 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Tue, 18 Aug 2015 18:04:48 +0000 (19:04 +0100)
PR c++/67216
* testsuite/tr1/2_general_utilities/shared_ptr/observers/bool_conv.cc:
Fix use of safe-bool idiom that isn't valid in C++11.

From-SVN: r226986

libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/observers/bool_conv.cc

index 351c66f4f085f30c9b01712834927c153b0ee194..22876060de7d71921617f9ec897a25e37d5f301a 100644 (file)
@@ -1,5 +1,9 @@
 2015-08-18  Jonathan Wakely  <jwakely@redhat.com>
 
+       PR c++/67216
+       * testsuite/tr1/2_general_utilities/shared_ptr/observers/bool_conv.cc:
+       Fix use of safe-bool idiom that isn't valid in C++11.
+
        * include/bits/ptr_traits.h: Include <bits/move.h> for addressof.
 
        PR libstdc++/67066
index 0c93f36c17cb58891023982d4f5b48dee96a6146..e7cefafc9e0b773d949cc0ecbd291790915d026a 100644 (file)
@@ -31,9 +31,9 @@ test01()
   bool test __attribute__((unused)) = true;
 
   const std::tr1::shared_ptr<A> p1;
-  VERIFY( p1 == false );
+  VERIFY( bool(p1) == false );
   const std::tr1::shared_ptr<A> p2(p1);
-  VERIFY( p2 == false );
+  VERIFY( bool(p2) == false );
 
   return 0;
 }