220 27899 <CANu6V4XoPDywfs1gg3ffy4=Y12ifqN9ktRyq8ZqprLzZXt_MVA@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: "'Johannes Schaub' via ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Protecting a function parameter pack from
 further deduction
Date: Tue, 23 Aug 2016 15:32:03 +0200
Lines: 43
Approved: news@gmane.org
Message-ID: <CANu6V4XoPDywfs1gg3ffy4=Y12ifqN9ktRyq8ZqprLzZXt_MVA@mail.gmail.com>
References: <CANu6V4XXfE5y3-opxMDSYhvH-vf+GCj8BDXhoeFVMS2uj9hDwg@mail.gmail.com>
 <6dda12e3-acbd-40ab-ae5d-afe538fbf308@isocpp.org> <CANu6V4VOwu9QV8AgaCgqtBvZ5S8EbDnoY0xKpBQiuFWw7qJ1Kg@mail.gmail.com>
 <83704294-59b0-4cd9-ad57-bf3b142b87f8@isocpp.org> <5aceab3e-d3e6-42b0-a735-846405f33633@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
X-Trace: blaine.gmane.org 1471959130 16488 195.159.176.226 (23 Aug 2016 13:32:10 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Tue, 23 Aug 2016 13:32:10 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCQPNCEZSQNBBVFA6G6QKGQECXQK7HY@isocpp.org Tue Aug 23 15:32:05 2016
Return-path: <std-proposals+bncBCQPNCEZSQNBBVFA6G6QKGQECXQK7HY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-yw0-f197.google.com ([209.85.161.197])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCQPNCEZSQNBBVFA6G6QKGQECXQK7HY@isocpp.org>)
	id 1bcBoD-0003y3-9z
	for gclcip-std-proposals@m.gmane.org; Tue, 23 Aug 2016 15:32:05 +0200
Original-Received: by mail-yw0-f197.google.com with SMTP id f123sf224051514ywd.2
        for <gclcip-std-proposals@m.gmane.org>; Tue, 23 Aug 2016 06:32:06 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=mime-version:in-reply-to:references:from:date:message-id:subject:to
         :x-original-sender:x-original-authentication-results:reply-to
         :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post
         :list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=VsQY+Y4Oj55OZuCFUogINEpRlz7MKrL9+xUly0rVvrU=;
        b=qxG56B46T42yKsfUNGDYBfrEw4Wwx2H0H6BnaD/ojWALJYmBvrk47uSAEdfG62ml3Z
         ytc922Rr81QQQ68CkG5JZGZhQ8ZZuNu5PmJfss8rG0EkWlo144R8RT32vObdBya47A1M
         dEQm1zvKSZr5NtEHtoXAVSBBfjfH+UsHZdKbSM8IFcB1ysc914lVvI5aupxEcQg3q99O
         0iLeISoo1axGsgw9pzaN7EH22lH8JZLve8EhjkvT05oG/cPgMyub7qVXnHkkykrRLR+K
         VILq4+B0E0EvEnqcTCdIiWUCygDWLoT5Mhu9c/x0AnWhItVyKgQTXpsconnS4eqqJbu3
         5xHQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:mime-version:in-reply-to:references:from:date
         :message-id:subject:to:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=VsQY+Y4Oj55OZuCFUogINEpRlz7MKrL9+xUly0rVvrU=;
        b=ANs20hqvFtNN3ZJ137skaIn49EuRAo00uB/DHZV5PpAVB+7va1vQIyq0bQ+t+wB5Td
         Zx0JnN7xW6ME/9ulN6KLiseMjz/rRjIh64wLiINP6f8AxxayaFZ2XKgQpihz1RGyWk0G
         oln+soXD4jmqU5Lcc0ewCuDMuV/xe8fg8uRoRzdfInxF/8UG8pv7+par0GJtc7xLoSHo
         JQXH22wpsV7jTsKcPU73ECsGBZFfGSMPsNQ5T6yIPQ46Fen8iTUrQH0XuwW9Ja/Wj1Qw
         bQv8MSS/tmR9vP7m9GADO+3g1JKSDH+h/StXUx4JXl1iFibnTzAdmbL611x5FI745Kx/
         8rIg==
X-Gm-Message-State: AEkooutIHlIY22a59zbM/fr57uzH3t7EIkrxr2jeM/I9sRRcoCbhdpo+OsE+7iRIGEOkZg==
X-Received: by 10.237.44.38 with SMTP id f35mr20565485qtd.18.1471959125902;
        Tue, 23 Aug 2016 06:32:05 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.107.160.199 with SMTP id j190ls4975330ioe.46.gmail; Tue, 23
 Aug 2016 06:32:04 -0700 (PDT)
X-Received: by 10.36.40.2 with SMTP id h2mr26871890ith.89.1471959124421;
        Tue, 23 Aug 2016 06:32:04 -0700 (PDT)
Original-Received: from mail-it0-x229.google.com (mail-it0-x229.google.com. [2607:f8b0:4001:c0b::229])
        by mx.google.com with ESMTPS id r133si22523811ith.58.2016.08.23.06.32.04
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Tue, 23 Aug 2016 06:32:04 -0700 (PDT)
Received-SPF: pass (google.com: domain of schaub.johannes@googlemail.com designates 2607:f8b0:4001:c0b::229 as permitted sender) client-ip=2607:f8b0:4001:c0b::229;
Original-Received: by mail-it0-x229.google.com with SMTP id x131so146887473ite.0
        for <std-proposals@isocpp.org>; Tue, 23 Aug 2016 06:32:04 -0700 (PDT)
X-Received: by 10.36.112.11 with SMTP id f11mr27920132itc.57.1471959123964;
 Tue, 23 Aug 2016 06:32:03 -0700 (PDT)
Original-Received: by 10.107.16.38 with HTTP; Tue, 23 Aug 2016 06:32:03 -0700 (PDT)
In-Reply-To: <5aceab3e-d3e6-42b0-a735-846405f33633@isocpp.org>
X-Original-Sender: schaub.johannes@googlemail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@googlemail.com;       spf=pass (google.com: domain of
 schaub.johannes@googlemail.com designates 2607:f8b0:4001:c0b::229 as
 permitted sender) smtp.mailfrom=schaub.johannes@googlemail.com;
       dmarc=pass (p=QUARANTINE dis=NONE) header.from=googlemail.com
X-Original-From: Johannes Schaub <schaub.johannes@googlemail.com>
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Google-Group-Id: 399137483710
List-Post: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:27899
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/27899>

2016-08-23 15:29 GMT+02:00 TONGARI J <tongari95@gmail.com>:
> On Tuesday, August 23, 2016 at 5:46:36 PM UTC+8, TONGARI J wrote:
>>
>> On Tuesday, August 23, 2016 at 3:00:29 PM UTC+8, Johannes Schaub wrote:
>>>
>>> Unfortunately, "nondeduced" does not work here, because the pack
>>> expansion is outside of it. Compilers appear to expand the pack before
>>> deducing the elements:
>>>
>>>
>>> template<typename ...T, class Z>
>>> void f(void(nodeduced_t<T>..., Z)) { }
>>>
>>> void g(int, char) { }
>>>
>>> int main() {
>>>    f<int>(g);
>>> }
>>>
>>> This will not compile, apparently compilers create "void(int,
>>> nondeduced_t<T>, Z)" and try to compare "nondeduced_t<T>" against
>>> "char". My "protected" prevents this "growing" of the parameter pack.
>>
>>
>> What are you trying to do with this example?
>
>
> Ah, so you want to deduce `Z` but have `T...` explicitly specified in that
> example, right?
> It's strange that the following works but the above example doesn't...`Z`
> somehow becomes non-deducible.
> template<typename ...T>
> void f(void(nodeduced_t<T>..., char)) { }
>

This works because you never try to call "f" with anything.

-- 
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CANu6V4XoPDywfs1gg3ffy4%3DY12ifqN9ktRyq8ZqprLzZXt_MVA%40mail.gmail.com.

.
