From f641b2d6bbe4702f1374d12c773d1f2027040524 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Tue, 18 Aug 2015 19:04:48 +0100 Subject: [PATCH] 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 --- libstdc++-v3/ChangeLog | 4 ++++ .../tr1/2_general_utilities/shared_ptr/observers/bool_conv.cc | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) 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; } -- 2.30.2