220 8498 <CAOfiQqkfdkKXTOX9J2kn9GB4KCzf3UbkGXcvqe+89ZEbB7X4Gw@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: Richard Smith <richard@metafoo.co.uk>
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: Thu, 9 Jan 2014 17:07:21 -0800
Lines: 115
Approved: news@gmane.org
Message-ID: <CAOfiQqkfdkKXTOX9J2kn9GB4KCzf3UbkGXcvqe+89ZEbB7X4Gw@mail.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>
	<52CF3D80.9090702@gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=20cf307c9e1220d0b704ef9359f9
X-Trace: ger.gmane.org 1389316037 11928 80.91.229.3 (10 Jan 2014 01:07:17 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Fri, 10 Jan 2014 01:07:17 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDVNBJG4YAIBBSMPXWLAKGQEK5ALR6A@isocpp.org Fri Jan 10 02:07:25 2014
Return-path: <std-proposals+bncBDVNBJG4YAIBBSMPXWLAKGQEK5ALR6A@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-qe0-f72.google.com ([209.85.128.72])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDVNBJG4YAIBBSMPXWLAKGQEK5ALR6A@isocpp.org>)
	id 1W1QZH-0004K9-Bh
	for gclcip-std-proposals@m.gmane.org; Fri, 10 Jan 2014 02:07:23 +0100
Original-Received: by mail-qe0-f72.google.com with SMTP id 5sf6525411qeb.3
        for <gclcip-std-proposals@m.gmane.org>; Thu, 09 Jan 2014 17:07:22 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:mime-version:sender:in-reply-to:references:date
         :message-id:subject:from: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=BO18/wyWpXTjZm7S9C+xAMDCQzH+xeaNS6gyE4kJ9Uc=;
        b=CeUzZ9mAErNgILcNI9vF1HYQt18Xt+T3C5w87cE65pVjwfC/u/LK3svp7u2DqzCnOw
         waPlqaKgFTa+BQYoZujzri4olpomwte/Q7NanayS32B8tK9rNuhG5/BoA0bcVSf0S5B/
         hJtt8IcR8DFqT6u5uUUUQzv5gvMtwyW88xAHnMVMmclJEQW4J4TkXT4TPWT24BvyxY7Q
         vwq/4h/WRJugyaHxTos7YFASrQVWuBktmljSVvnqacbaquCeDRY7lqhtWGxRMe+8kHhX
         8kVnz9N9PkiFTlvMaOprqziCoRB4k3ElIJHVEudwVVNataUn8tvNN2Zao+qrD+kogWJj
         KEaQ==
X-Gm-Message-State: ALoCoQnIZu69qGNWn9K8syqmyJleLouqoYy3+x2B62fFRapjPkF35QpnboirHpPAJtcTgPUh0Icz
X-Received: by 10.236.228.228 with SMTP id f94mr2202742yhq.43.1389316042582;
        Thu, 09 Jan 2014 17:07:22 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.49.3.228 with SMTP id f4ls1218676qef.85.gmail; Thu, 09 Jan
 2014 17:07:21 -0800 (PST)
X-Received: by 10.49.40.137 with SMTP id x9mr1440655qek.18.1389316041756;
        Thu, 09 Jan 2014 17:07:21 -0800 (PST)
Original-Received: from mail-vb0-x22b.google.com (mail-vb0-x22b.google.com [2607:f8b0:400c:c02::22b])
        by mx.google.com with ESMTPS id e16si7818780qej.53.2014.01.09.17.07.21
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Thu, 09 Jan 2014 17:07:21 -0800 (PST)
Received-SPF: pass (google.com: domain of metafoo@gmail.com designates 2607:f8b0:400c:c02::22b as permitted sender) client-ip=2607:f8b0:400c:c02::22b;
Original-Received: by mail-vb0-f43.google.com with SMTP id p6so2762458vbe.30
        for <std-proposals@isocpp.org>; Thu, 09 Jan 2014 17:07:21 -0800 (PST)
X-Received: by 10.52.26.148 with SMTP id l20mr4538559vdg.28.1389316041393;
 Thu, 09 Jan 2014 17:07:21 -0800 (PST)
Original-Sender: metafoo@gmail.com
Original-Received: by 10.58.136.227 with HTTP; Thu, 9 Jan 2014 17:07:21 -0800 (PST)
In-Reply-To: <52CF3D80.9090702@gmail.com>
X-Original-Sender: richard@metafoo.co.uk
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of metafoo@gmail.com designates 2607:f8b0:400c:c02::22b as permitted
 sender) smtp.mail=metafoo@gmail.com;       dkim=pass header.i=@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:8498
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/8498>

--20cf307c9e1220d0b704ef9359f9
Content-Type: text/plain; charset=ISO-8859-1

On Thu, Jan 9, 2014 at 4:23 PM, David Krauss <potswa@gmail.com> wrote:

> 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.
>

It allows more code reuse, by allowing handling of individual elements of
such a pack to be factored out. That is a valuable property, even if it
only helps those people who are writing template metaprograms.


> 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/.

--20cf307c9e1220d0b704ef9359f9
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On T=
hu, Jan 9, 2014 at 4:23 PM, David Krauss <span dir=3D"ltr">&lt;<a href=3D"m=
ailto:potswa@gmail.com" target=3D"_blank">potswa@gmail.com</a>&gt;</span> w=
rote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><div class=3D"im">On 1/10/14 8:11 AM, David =
Krauss wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
On 1/9/14 11:18 AM, Richard Smith wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
The useful thing about introducing a new feature is that you get to specify=
<br>
how it works =3D) Naturally, we would specify that passing a generic templa=
te<br>
argument to another template preserves the kind of template argument.<br>
</blockquote>
<br>
But how can you make that work without redoing how parsers must classify ty=
pe-dependent expressions? And what&#39;s the benefit, given that overloadin=
g/partial specialization already solve the problem?<br>
</blockquote>
<br></div>
I should be more specific.<br>
<br>
Given &quot;?&quot;, you can peel off a fully-generic argument from a pack,=
 and pass it to another template. But the other template must be either ful=
ly-generic, or overloaded/partially specialized. So you might as well peel =
the pack in the target overloaded/partially specialized template. All &quot=
;?&quot; buys you is the freedom to add a dispatcher between components whi=
ch are actually necessary.<br>
</blockquote><div><br></div><div>It allows more code reuse, by allowing han=
dling of individual elements of such a pack to be factored out. That is a v=
aluable property, even if it only helps those people who are writing templa=
te metaprograms.</div>
<div>=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;=
border-left:1px #ccc solid;padding-left:1ex">
I don&#39;t see any applications for fully-generic arguments outside metapr=
ocessing, 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 r=
untime instances of a stateless class.</blockquote>
</div></div></div>

<p></p>

-- <br />
&nbsp;<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

--20cf307c9e1220d0b704ef9359f9--

.
