From: Jonathan Wakely Date: Sat, 28 May 2011 19:15:41 +0000 (+0000) Subject: pointer_to.cc: Fix. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b8d85086edff72576dfceb94fb5e245075ec4ab6;p=gcc.git pointer_to.cc: Fix. 2011-05-28 Jonathan Wakely * testsuite/20_util/pointer_traits/pointer_to.cc: Fix. From-SVN: r174384 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 393b728e470..1ddef589fa9 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,7 @@ +2011-05-28 Jonathan Wakely + + * testsuite/20_util/pointer_traits/pointer_to.cc: Fix. + 2011-05-28 Jonathan Wakely * acinclude.m4: Define GLIBCXX_CHECK_GET_NPROCS and diff --git a/libstdc++-v3/testsuite/20_util/pointer_traits/pointer_to.cc b/libstdc++-v3/testsuite/20_util/pointer_traits/pointer_to.cc index 557e3848a17..f33582e540c 100644 --- a/libstdc++-v3/testsuite/20_util/pointer_traits/pointer_to.cc +++ b/libstdc++-v3/testsuite/20_util/pointer_traits/pointer_to.cc @@ -24,15 +24,17 @@ struct Ptr { typedef bool element_type; + bool* value; - static bool* pointer_to(bool& b) { return 0; } + static Ptr pointer_to(bool& b) { return Ptr{&b}; } }; void test01() { bool test = true; + Ptr p{&test}; - VERIFY( std::pointer_traits::pointer_to(test) == 0 ); + VERIFY( std::pointer_traits::pointer_to(test).value == &test ); } void test02()