pointer_to.cc: Fix.

2011-05-28  Jonathan Wakely  <jwakely.gcc@gmail.com>

	* testsuite/20_util/pointer_traits/pointer_to.cc: Fix.

From-SVN: r174384
This commit is contained in:
Jonathan Wakely 2011-05-28 19:15:41 +00:00 committed by Jonathan Wakely
parent 43653c334d
commit b8d85086ed
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,7 @@
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

View File

@ -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<Ptr>::pointer_to(test) == 0 );
VERIFY( std::pointer_traits<Ptr>::pointer_to(test).value == &test );
}
void test02()