public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Ville Voutilainen <ville.voutilainen@gmail.com>
To: libstdc++@gcc.gnu.org
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Re: [v3 PATCH] Implement N4387 and LWG 2367
Date: Sun, 07 Jun 2015 08:49:00 -0000	[thread overview]
Message-ID: <CAFk2RUZ=EyiQuuQgP_2-NdCtU0tFnnwuZz7ggn4eupPru8zL2g@mail.gmail.com> (raw)
In-Reply-To: <CAFk2RUZO75qesPR11wNp-mcz5wi5ArnE2_oFk5U=iV_YWUHnNQ@mail.gmail.com>

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.

>> 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.

...and I think it doesn't necessarily need to be non-type, I think it can be
made to work with a type parameter that is enable_if<X, true_type>
and enable_if<X, false_type> for the mutually-exclusive overloads.

  reply	other threads:[~2015-06-07  8:33 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 [this message]
2015-06-07  8:50       ` Ville Voutilainen
2015-06-07 11:37       ` Marc Glisse
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='CAFk2RUZ=EyiQuuQgP_2-NdCtU0tFnnwuZz7ggn4eupPru8zL2g@mail.gmail.com' \
    --to=ville.voutilainen@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).