public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Marc Glisse <marc.glisse@inria.fr>
To: Ville Voutilainen <ville.voutilainen@gmail.com>
Cc: libstdc++@gcc.gnu.org,
	"gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Re: [v3 PATCH] Implement N4387 and LWG 2367
Date: Sun, 07 Jun 2015 11:37:00 -0000	[thread overview]
Message-ID: <alpine.DEB.2.20.1506071038540.2000@laptop-mg.saclay.inria.fr> (raw)
In-Reply-To: <CAFk2RUZ=EyiQuuQgP_2-NdCtU0tFnnwuZz7ggn4eupPru8zL2g@mail.gmail.com>

On Sun, 7 Jun 2015, Ville Voutilainen wrote:

> On 7 June 2015 at 11:12, Ville Voutilainen <ville.voutilainen@gmail.com> wrote:
>>> Does the following code still compile with your patch?
>>> struct A { int a,b; };
>>> std::tuple<int,int,A> a(3,4,{1,2});
>>
>> No. :/ And we have no test for it.. I'll need to look at that.
>
> Ahem, yes, this is because the constructor that used to take _Elements
> now takes _UElements. I can change it back to take _Elements, because
> the technique that the default constructors use allow making the signature
> dependent enough that it will sfinae correctly.

Yes.

>>> You use a lot: typename enable_if<X, bool>::type=true
>>> while the current code seems to favor: class=typename enable_if<X>::type.
>>> I don't really care which one is used, but it is easier to read when the
>>> style is consistent through the library.
>> It's not a style issue. That template parameter needs to be a non-type one,
>> otherwise the overloads are ambiguous.

Ah, I had overlooked that. I have seen several work-arounds for this 
issue, but I don't remember this one, it seems nice.

-- 
Marc Glisse

  parent reply	other threads:[~2015-06-07  8:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-07  6:53 Ville Voutilainen
2015-06-07  8:13 ` Marc Glisse
2015-06-07  8:33   ` Ville Voutilainen
2015-06-07  8:49     ` Ville Voutilainen
2015-06-07  8:50       ` Ville Voutilainen
2015-06-07 11:37       ` Marc Glisse [this message]
2015-06-08 15:41 ` Martin Sebor
2015-06-08 15:56   ` Ville Voutilainen
2015-06-08 16:16     ` Ville Voutilainen
2015-06-14  7:07       ` Ville Voutilainen
2015-06-30 13:28         ` Jonathan Wakely

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=alpine.DEB.2.20.1506071038540.2000@laptop-mg.saclay.inria.fr \
    --to=marc.glisse@inria.fr \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=libstdc++@gcc.gnu.org \
    --cc=ville.voutilainen@gmail.com \
    /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).