220 8497 <52CF3D80.9090702@gmail.com> article
Path: news.gmane.org!not-for-mail
From: David Krauss <potswa@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: A new keyword for either a type or a variable
 (typical use case for variadic template template)?
Date: Fri, 10 Jan 2014 08:23:28 +0800
Lines: 35
Approved: news@gmane.org
Message-ID: <52CF3D80.9090702@gmail.com>
References: <f4ec2cca-5951-447f-a938-0b2e5e3e233f@isocpp.org>	<-5123564187529511709@gmail297201516>	<52CB7506.1000906@gmail.com>	<CAOfiQqk4rRTRFX3dbcq33z2C190ZHUGRVUhM0WRJehPZEwFJ8g@mail.gmail.com>	<62bda680-3dd7-4be8-8ac5-0d2e08bf6d99@isocpp.org>	<CAOfiQq=fvi-mzf6mP4B2XBgCeHfimX857Jff+Nz=iUeHW5W1nw@mail.gmail.com>	<52CDFB2D.4050703@gmail.com>	<-9126987679220332623@gmail297201516>	<52CE0F54.5020800@gmail.com> <CAOfiQqmi3UHRSvgQB_5ZdWrM3oRog4RpgsighU2a3p6HjoVq8g@mail.gmail.com> <52CF3AB0.7090102@gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
X-Trace: ger.gmane.org 1389313471 17638 80.91.229.3 (10 Jan 2014 00:24:31 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Fri, 10 Jan 2014 00:24:31 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCW25A7E3QCRBQX3XSLAKGQE72XDRLY@isocpp.org Fri Jan 10 01:24:38 2014
Return-path: <std-proposals+bncBCW25A7E3QCRBQX3XSLAKGQE72XDRLY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-pb0-f72.google.com ([209.85.160.72])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCW25A7E3QCRBQX3XSLAKGQE72XDRLY@isocpp.org>)
	id 1W1Pts-0000a2-D5
	for gclcip-std-proposals@m.gmane.org; Fri, 10 Jan 2014 01:24:36 +0100
Original-Received: by mail-pb0-f72.google.com with SMTP id jt11sf8742711pbb.7
        for <gclcip-std-proposals@m.gmane.org>; Thu, 09 Jan 2014 16:24:35 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to
         :subject:references:in-reply-to:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe:content-type;
        bh=NKNC8rjRXWHQKWSbJdd31qlIjNrNhR7Z1mDNhZtGSuI=;
        b=XWcXMkXch70jCRY8a0AGK8lmbC4nzG8gS1cx4n+x5LPfifLNaeWtSuGUA3COTP/WX4
         k8YRhxEioMUqxXfLd+rKJMRt2XY9iIO6DtqtFpYFSgYlHmTVaSV1CUX9JNa71dbbzTEJ
         LfNt7vx7kw/Z/xp7EEhEdWj/5mnfxbu5gFPk9LFZQvw0Chd6nEbRZ7hceFtezJGu59r8
         j41ONLtBstpCHrY/kBeV43Rioy8zsziIyhWoy7saNur/KIJKWhquD3cXUTDiyZkM4a0/
         gMX4S7wOVJVnKX2DzPEnd/w9yHMd2mnWAWhMtM81qyOPrStqGJRt6sZgVS3JC0gXm3vf
         mO4Q==
X-Gm-Message-State: ALoCoQmzjsGvfkuH1cUNRj9KsVClWZjZeSRIbbalmR3q6fiWvCvoetRcl29ieJVnu7eYvgHAUaLv
X-Received: by 10.66.240.4 with SMTP id vw4mr2345116pac.10.1389313475235;
        Thu, 09 Jan 2014 16:24:35 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.49.40.164 with SMTP id y4ls1400978qek.89.gmail; Thu, 09 Jan
 2014 16:24:34 -0800 (PST)
X-Received: by 10.236.122.165 with SMTP id t25mr8107181yhh.46.1389313474229;
        Thu, 09 Jan 2014 16:24:34 -0800 (PST)
Original-Received: from mail-pb0-x22a.google.com (mail-pb0-x22a.google.com [2607:f8b0:400e:c01::22a])
        by mx.google.com with ESMTPS id s23si6707462yhf.103.2014.01.09.16.24.34
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Thu, 09 Jan 2014 16:24:34 -0800 (PST)
Received-SPF: pass (google.com: domain of potswa@gmail.com designates 2607:f8b0:400e:c01::22a as permitted sender) client-ip=2607:f8b0:400e:c01::22a;
Original-Received: by mail-pb0-f42.google.com with SMTP id uo5so3731541pbc.1
        for <std-proposals@isocpp.org>; Thu, 09 Jan 2014 16:24:33 -0800 (PST)
X-Received: by 10.68.134.98 with SMTP id pj2mr7094026pbb.110.1389313473370;
        Thu, 09 Jan 2014 16:24:33 -0800 (PST)
Original-Received: from Davids-MacBook-Pro.local ([121.54.44.159])
        by mx.google.com with ESMTPSA id yd4sm12767057pbc.13.2014.01.09.16.23.49
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Thu, 09 Jan 2014 16:24:32 -0800 (PST)
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.2.0
In-Reply-To: <52CF3AB0.7090102@gmail.com>
X-Original-Sender: potswa@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of potswa@gmail.com designates 2607:f8b0:400e:c01::22a as permitted
 sender) smtp.mail=potswa@gmail.com;       dkim=pass header.i=@gmail.com;
       dmarc=pass (p=NONE dis=NONE) header.from=gmail.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: <http://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:8497
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/8497>

On 1/10/14 8:11 AM, David Krauss wrote:
> On 1/9/14 11:18 AM, Richard Smith wrote:
>> The useful thing about introducing a new feature is that you get to 
>> specify
>> how it works =) Naturally, we would specify that passing a generic 
>> template
>> argument to another template preserves the kind of template argument.
>
> But how can you make that work without redoing how parsers must 
> classify type-dependent expressions? And what's the benefit, given 
> that overloading/partial specialization already solve the problem?

I should be more specific.

Given "?", you can peel off a fully-generic argument from a pack, and 
pass it to another template. But the other template must be either 
fully-generic, or overloaded/partially specialized. So you might as well 
peel the pack in the target overloaded/partially specialized template. 
All "?" buys you is the freedom to add a dispatcher between components 
which are actually necessary.

I don't see any applications for fully-generic arguments outside 
metaprocessing, e.g. of packs. There is no runtime code application 
parameterized over all types or all values of any type. For value-like 
types, i.e. std::integral_constant, it is idiomatic (and makes perfect 
sense) to deal with runtime instances of a stateless class.

-- 

--- 
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

.
