2011-05-28 Jonathan Wakely <jwakely.gcc@gmail.com>
* testsuite/20_util/pointer_traits/pointer_to.cc: Fix.
From-SVN: r174384
+2011-05-28 Jonathan Wakely <jwakely.gcc@gmail.com>
+
+ * testsuite/20_util/pointer_traits/pointer_to.cc: Fix.
+
2011-05-28 Jonathan Wakely <jwakely.gcc@gmail.com>
* acinclude.m4: Define GLIBCXX_CHECK_GET_NPROCS and
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<Ptr>::pointer_to(test) == 0 );
+ VERIFY( std::pointer_traits<Ptr>::pointer_to(test).value == &test );
}
void test02()