From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 106248 invoked by alias); 7 Jun 2015 08:33:48 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 106227 invoked by uid 89); 7 Jun 2015 08:33:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-ig0-f179.google.com Received: from mail-ig0-f179.google.com (HELO mail-ig0-f179.google.com) (209.85.213.179) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Sun, 07 Jun 2015 08:33:47 +0000 Received: by igbhj9 with SMTP id hj9so41017499igb.1; Sun, 07 Jun 2015 01:33:45 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.50.110.104 with SMTP id hz8mr7004814igb.38.1433666025073; Sun, 07 Jun 2015 01:33:45 -0700 (PDT) Received: by 10.36.152.8 with HTTP; Sun, 7 Jun 2015 01:33:45 -0700 (PDT) In-Reply-To: References: Date: Sun, 07 Jun 2015 08:49:00 -0000 Message-ID: Subject: Re: [v3 PATCH] Implement N4387 and LWG 2367 From: Ville Voutilainen To: libstdc++@gcc.gnu.org Cc: "gcc-patches@gcc.gnu.org" Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2015-06/txt/msg00510.txt.bz2 On 7 June 2015 at 11:12, Ville Voutilainen wrote: >> Does the following code still compile with your patch? >> struct A { int a,b; }; >> std::tuple 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::type=true >> while the current code seems to favor: class=typename enable_if::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 and enable_if for the mutually-exclusive overloads.