From: Jonathan Wakely Date: Tue, 18 Aug 2015 18:04:48 +0000 (+0100) Subject: re PR c++/67216 (false is still a null pointer constant) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f641b2d6bbe4702f1374d12c773d1f2027040524;p=gcc.git re PR c++/67216 (false is still a null pointer constant) 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 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 351c66f4f08..22876060de7 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,9 @@ 2015-08-18 Jonathan Wakely + 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 for addressof. PR libstdc++/67066 diff --git a/libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/observers/bool_conv.cc b/libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/observers/bool_conv.cc index 0c93f36c17c..e7cefafc9e0 100644 --- a/libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/observers/bool_conv.cc +++ b/libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/observers/bool_conv.cc @@ -31,9 +31,9 @@ test01() bool test __attribute__((unused)) = true; const std::tr1::shared_ptr p1; - VERIFY( p1 == false ); + VERIFY( bool(p1) == false ); const std::tr1::shared_ptr p2(p1); - VERIFY( p2 == false ); + VERIFY( bool(p2) == false ); return 0; }