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:33:00 -0000	[thread overview]
Message-ID: <CAFk2RUZO75qesPR11wNp-mcz5wi5ArnE2_oFk5U=iV_YWUHnNQ@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.20.1506070748560.2000@laptop-mg.saclay.inria.fr>

On 7 June 2015 at 09:53, Marc Glisse <marc.glisse@inria.fr> wrote:
> Since the paper does not mention looking at _MoveConstructibleTuple or
> _ImplicitlyMoveConvertibleTuple here, could you add a comment explaining
> why that is needed?

Sure.

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

> IMO the parts with is_default_constructible point to a core issue, we should
> not have to duplicate information, especially in such a convoluted way. But
> I guess that has lower priority than noexcept(auto), and I haven't yet
> looked if concepts will help.

Concepts would help a lot, but being able to use them in a library
implementation
is some ways off.

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

> Introducing
> typename _XXX = _TC<(sizeof...(_Elements) == sizeof...(_UElements)),
> _Elements...>
> and then using _XXX::template thing() might give less clutter when you have
> to repeat it 4 times.

Sounds good, I'll give it a spin.

  reply	other threads:[~2015-06-07  8:13 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 [this message]
2015-06-07  8:49     ` Ville Voutilainen
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='CAFk2RUZO75qesPR11wNp-mcz5wi5ArnE2_oFk5U=iV_YWUHnNQ@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).