220 8481 <CAOfiQqmi3UHRSvgQB_5ZdWrM3oRog4RpgsighU2a3p6HjoVq8g@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: Wed, 8 Jan 2014 19:18:08 -0800
Lines: 174
Approved: news@gmane.org
Message-ID: <CAOfiQqmi3UHRSvgQB_5ZdWrM3oRog4RpgsighU2a3p6HjoVq8g@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>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=047d7bd6b5b4015a7604ef810f40
X-Trace: ger.gmane.org 1389237485 19672 80.91.229.3 (9 Jan 2014 03:18:05 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Thu, 9 Jan 2014 03:18:05 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDVNBJG4YAIBB4FJXCLAKGQEMXQXF3I@isocpp.org Thu Jan 09 04:18:12 2014
Return-path: <std-proposals+bncBDVNBJG4YAIBB4FJXCLAKGQEMXQXF3I@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-oa0-f69.google.com ([209.85.219.69])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDVNBJG4YAIBB4FJXCLAKGQEMXQXF3I@isocpp.org>)
	id 1W168I-0004yw-Gy
	for gclcip-std-proposals@m.gmane.org; Thu, 09 Jan 2014 04:18:10 +0100
Original-Received: by mail-oa0-f69.google.com with SMTP id m1sf9559344oag.8
        for <gclcip-std-proposals@m.gmane.org>; Wed, 08 Jan 2014 19:18:09 -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=4XKNJBY2g5/SsUhpB0+eQ0u8ZIGxEM14b7sRr26UAs0=;
        b=KvtHGZSvkZzS/RfG4DcJcWaRdfFSkbBryb718XvJrxRMWhAK3/QMUARgy+fokbudBO
         qfjC0mDUn4m+lHBDHGbHjLL0kvjNgWxO6PRVsQTSwBR0fMFsnj1djpxyr9P41Isb+kyu
         pfeMLJ8cLBKELB7UwrdylXfF3IqCcICizgjlEa4qcI6s+qlMVnpqiKWHDLzjFRoWYs/X
         9QxkgifAVZCF0TQ03x3GD8zf0mMgKTm0dNDiG9KkbwozjwHdAuE3HJfyR6FrKTgYlG/i
         8Rqtys49h5NrDy/VhOF3WWj/y4K1XOLDkasSO9UUrjhiDmemHdnuFq+QIG/JWr/u/UZQ
         Xykg==
X-Gm-Message-State: ALoCoQnS8KoyGaaEjnD4XCVmE8ViAHBpb/ZzMEJx7Ff/sS14fQcqjuR0uR/QriRi7etH3mEHPm7h
X-Received: by 10.50.47.18 with SMTP id z18mr17210475igm.1.1389237489556;
        Wed, 08 Jan 2014 19:18:09 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.49.131.4 with SMTP id oi4ls901870qeb.76.gmail; Wed, 08 Jan
 2014 19:18:08 -0800 (PST)
X-Received: by 10.236.160.9 with SMTP id t9mr1033846yhk.10.1389237488766;
        Wed, 08 Jan 2014 19:18:08 -0800 (PST)
Original-Received: from mail-ve0-x22b.google.com (mail-ve0-x22b.google.com [2607:f8b0:400c:c01::22b])
        by mx.google.com with ESMTPS id x4si3663708qad.60.2014.01.08.19.18.08
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Wed, 08 Jan 2014 19:18:08 -0800 (PST)
Received-SPF: pass (google.com: domain of metafoo@gmail.com designates 2607:f8b0:400c:c01::22b as permitted sender) client-ip=2607:f8b0:400c:c01::22b;
Original-Received: by mail-ve0-f171.google.com with SMTP id pa12so1948825veb.30
        for <std-proposals@isocpp.org>; Wed, 08 Jan 2014 19:18:08 -0800 (PST)
X-Received: by 10.58.227.38 with SMTP id rx6mr485748vec.10.1389237488391; Wed,
 08 Jan 2014 19:18:08 -0800 (PST)
Original-Sender: metafoo@gmail.com
Original-Received: by 10.58.136.227 with HTTP; Wed, 8 Jan 2014 19:18:08 -0800 (PST)
In-Reply-To: <52CE0F54.5020800@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:c01::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:8481
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/8481>

--047d7bd6b5b4015a7604ef810f40
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On Wed, Jan 8, 2014 at 6:54 PM, David Krauss <potswa@gmail.com> wrote:

> On 1/9/14 10:41 AM, Richard Smith wrote:
>
>> On Wed Jan 08 2014 at 5:28:21 PM, David Krauss <potswa@gmail.com> wrote:
>>
>> It's not an overload, it's a partial specialization.
>>
>
> OK, that wasn't clear from the example. So do you intend that an
> identifier declared with "?" never be used? What could you possibly do wi=
th
> X?


You would only be able to use it as a template-argument.


> Quoting the previous message:
>
>  I still don't see the value of an identifier, as opposed to a pack
>>> expansion element, that can be either a type or a value. And such a nam=
e
>>> would throw a wrench into template parsing. They could *only* be used a=
s
>>> explicit template arguments to functions as in my example above, or to
>>> template template parameters with "?"-like parameter lists.
>>>
>>
> Edit: You couldn't even use X in these cases, because parse time ambiguit=
y
> of a template argument is always resolved in favor of a typename
> ([temp.arg] =A714.3/2).


The useful thing about introducing a new feature is that you get to specify
how it works =3D) Naturally, we would specify that passing a generic templa=
te
argument to another template preserves the kind of template argument.


>  If you end up needing to use is_type, you're already in deep shit.
>>>
>>> On the other hand, parameter lists are already unpacked using
>>> overloading, or partial specialization which works the same way. This
>>> gives you a branching point to different code paths for type, value, or
>>> template, which can already be written and parsed without redesigning
>>> dependent name lookup.
>>>
>>> This is why I think "..." is sufficient with no motivation for "?" or
>>> any provision for a single argument.
>>>
>>>
> --
>
> --- 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/.
>

--=20

---=20
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 e=
mail 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-proposa=
ls/.

--047d7bd6b5b4015a7604ef810f40
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 W=
ed, Jan 8, 2014 at 6:54 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/9/14 10:41 AM, Richar=
d Smith wrote:<br>
</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-l=
eft:1px #ccc solid;padding-left:1ex"><div class=3D"im">
On Wed Jan 08 2014 at 5:28:21 PM, David Krauss &lt;<a href=3D"mailto:potswa=
@gmail.com" target=3D"_blank">potswa@gmail.com</a>&gt; wrote:<br>
<br></div><div class=3D"im">
It&#39;s not an overload, it&#39;s a partial specialization.<br>
</div></blockquote>
<br>
OK, that wasn&#39;t clear from the example. So do you intend that an identi=
fier declared with &quot;?&quot; never be used? What could you possibly do =
with X?</blockquote><div><br></div><div>You would only be able to use it as=
 a template-argument.</div>
<div>=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;=
border-left:1px #ccc solid;padding-left:1ex"><div class=3D"im">
Quoting the previous message:<br>
<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><blockquote class=3D"gmail_quote" style=3D"m=
argin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I still don&#39;t see the value of an identifier, as opposed to a pack<br>
expansion element, that can be either a type or a value. And such a name<br=
>
would throw a wrench into template parsing. They could *only* be used as<br=
>
explicit template arguments to functions as in my example above, or to<br>
template template parameters with &quot;?&quot;-like parameter lists.<br>
</blockquote></blockquote>
<br></div>
Edit: You couldn&#39;t even use X in these cases, because parse time ambigu=
ity of a template argument is always resolved in favor of a typename ([temp=
..arg] =A714.3/2).</blockquote><div><br></div><div>The useful thing about in=
troducing a new feature is that you get to specify how it works =3D) Natura=
lly, we would specify that passing a generic template argument to another t=
emplate preserves the kind of template argument.</div>
<div>=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;=
border-left:1px #ccc solid;padding-left:1ex"><div class=3D"HOEnZb"><div cla=
ss=3D"h5">
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><blockquote class=3D"gmail_quote" style=3D"m=
argin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
If you end up needing to use is_type, you&#39;re already in deep shit.<br>
<br>
On the other hand, parameter lists are already unpacked using<br>
overloading, or partial specialization which works the same way. This<br>
gives you a branching point to different code paths for type, value, or<br>
template, which can already be written and parsed without redesigning<br>
dependent name lookup.<br>
<br>
This is why I think &quot;...&quot; is sufficient with no motivation for &q=
uot;?&quot; or<br>
any provision for a single argument.<br>
<br>
</blockquote></blockquote>
<br>
-- <br>
<br>
--- You received this message because you are subscribed to the Google Grou=
ps &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 <a href=3D"mailto:std-proposals%2Bunsubscribe@isocpp.org" target=3D=
"_blank">std-proposals+unsubscribe@<u></u>isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">std-proposals@isocpp.org</a>.<br>
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/" target=3D"_blank">http://groups.google.com/a/<u></u>isocpp.=
org/group/std-<u></u>proposals/</a>.<br>
</div></div></blockquote></div><br></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 />

--047d7bd6b5b4015a7604ef810f40--

.
