public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely.gcc@gmail.com>
To: "libstdc++" <libstdc++@gcc.gnu.org>,
	gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [v3] Implement pointer_traits and allocator_traits
Date: Sun, 29 May 2011 09:42:00 -0000	[thread overview]
Message-ID: <BANLkTike2R4ZZ5udrqYoWSz5MmqSEvn8zQ@mail.gmail.com> (raw)
In-Reply-To: <BANLkTimBQdDDrMWMsFqxtTx-c1RM-Q-YdA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 727 bytes --]

On 28 May 2011 20:08, Jonathan Wakely wrote:
> On 28 May 2011 18:14, Jonathan Wakely wrote:
>> One more test
>>
>> 2011-05-28  Jonathan Wakely  <jwakely.gcc@gmail.com>
>>
>>        * testsuite/20_util/pointer_traits/pointer_to.cc: New.
>>
>> Tested x86_64-linux, committed to trunk.
>>
>
> This new test is failing, I'm looking into why, will revert it if necessary ...
>

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

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

I added the pointer_traits<Ptr> case at the last minute and it was
broken, not sure how I didn't notice - I must have tested in the wrong
directory.  This fixes it, definitely tested this time, sorry for the
mess!

[-- Attachment #2: fix.txt --]
[-- Type: text/plain, Size: 662 bytes --]

Index: testsuite/20_util/pointer_traits/pointer_to.cc
===================================================================
--- testsuite/20_util/pointer_traits/pointer_to.cc	(revision 174381)
+++ testsuite/20_util/pointer_traits/pointer_to.cc	(working copy)
@@ -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()

      reply	other threads:[~2011-05-28 19:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-28 17:05 Jonathan Wakely
2011-05-28 17:14 ` Jonathan Wakely
2011-05-28 17:27 ` Jonathan Wakely
2011-05-28 17:29   ` Jonathan Wakely
2011-05-28 22:59 ` Jonathan Wakely
2011-05-29  9:39   ` Jonathan Wakely
2011-05-29  9:42     ` Jonathan Wakely [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BANLkTike2R4ZZ5udrqYoWSz5MmqSEvn8zQ@mail.gmail.com \
    --to=jwakely.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=libstdc++@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).