220 9831 <93E854CB-24C9-49ED-BE88-1A43D0FD715A@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: auto variable templates?
Date: Sun, 16 Mar 2014 16:00:02 +0800
Lines: 79
Approved: news@gmane.org
Message-ID: <93E854CB-24C9-49ED-BE88-1A43D0FD715A@gmail.com>
References: <ec829ec4-9d4e-4d5c-8673-a58d46fec41b@isocpp.org> <CAOfiQqkf4N3Pga8V7n6as-CBdWWGJeKh-0s8ONxsdpRtamo-Cg@mail.gmail.com> <CANu6V4ViH09LeqDs_Vc2tivK97=6yThejGLJ6+m0dRx0Fu+vRQ@mail.gmail.com> <CAOfiQq=-DRrjX2sAxpqPhhorg4ARW9q4vNA=D5k7wHzikjMiBg@mail.gmail.com> <CANu6V4WZWY0+EWY=1_UWN1Yi8202mwCdiQQiLhY-hGFLCtAR6g@mail.gmail.com> <878usaa8hz.fsf@euclid.axiomatics.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0 (Mac OS X Mail 7.2 \(1874\))
Content-Type: multipart/alternative; boundary="Apple-Mail=_1F6E5604-0410-4CF4-BB7A-1C6308A8C33F"
X-Trace: ger.gmane.org 1394956803 26212 80.91.229.3 (16 Mar 2014 08:00:03 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Sun, 16 Mar 2014 08:00:03 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCW25A7E3QCRBB5USWMQKGQE7GY6V7Q@isocpp.org Sun Mar 16 09:00:12 2014
Return-path: <std-proposals+bncBCW25A7E3QCRBB5USWMQKGQE7GY6V7Q@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ig0-f199.google.com ([209.85.213.199])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCW25A7E3QCRBB5USWMQKGQE7GY6V7Q@isocpp.org>)
	id 1WP5zN-0008EV-QN
	for gclcip-std-proposals@m.gmane.org; Sun, 16 Mar 2014 09:00:10 +0100
Original-Received: by mail-ig0-f199.google.com with SMTP id uy17sf5014066igb.2
        for <gclcip-std-proposals@m.gmane.org>; Sun, 16 Mar 2014 01:00:08 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:from:message-id:mime-version:subject:date
         :references:to: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=1uz7BR78zu8yKP/nltIWk0BkQsJiSoCsPaor9pWTQSE=;
        b=QwEl2bbXidMMGllcl2AjOpQSzOawvHuqpvEHoSOC45XiaILwHwSw9AitXuP45dPCR8
         LrKJe+T/Scm6jot9NRt6Lo3TTzYLGXffcfKeovq4APczwpwbv8nywYFWMLUwyb/j59y2
         yZvz2q1xas9BheMJ0QYerF300lnu7jagzZawTd1REUSW45cNb8JtdDs4j9h8Q21w/fKE
         gT6ISMroAjFjGe0q/appYgToEE1qqs/pPoQ870iLjRTWtw/6ByrEB9MT0+DoA6CKmqFk
         7vZXklrikiOWt4yPHQqePy8iLUgKE5kIhZREmJCiyat73jTUq212b9Nk9k7pRdNHi2UO
         P3ZQ==
X-Gm-Message-State: ALoCoQmlqDAKzS2Yxh4CaE5ajCq8FvGpekOsRWq5vyL8wYmphSvvGvE7UAeFYGPtAWds3LFXhtVs
X-Received: by 10.50.114.134 with SMTP id jg6mr2935210igb.2.1394956808516;
        Sun, 16 Mar 2014 01:00:08 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.50.111.135 with SMTP id ii7ls576713igb.30.canary; Sun, 16 Mar
 2014 01:00:07 -0700 (PDT)
X-Received: by 10.69.31.75 with SMTP id kk11mr18609790pbd.101.1394956807309;
        Sun, 16 Mar 2014 01:00:07 -0700 (PDT)
Original-Received: from mail-pb0-x22f.google.com (mail-pb0-x22f.google.com [2607:f8b0:400e:c01::22f])
        by mx.google.com with ESMTPS id iw3si2632573pac.383.2014.03.16.01.00.07
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Sun, 16 Mar 2014 01:00:07 -0700 (PDT)
Received-SPF: pass (google.com: domain of potswa@gmail.com designates 2607:f8b0:400e:c01::22f as permitted sender) client-ip=2607:f8b0:400e:c01::22f;
Original-Received: by mail-pb0-f47.google.com with SMTP id up15so4413081pbc.20
        for <std-proposals@isocpp.org>; Sun, 16 Mar 2014 01:00:07 -0700 (PDT)
X-Received: by 10.66.141.197 with SMTP id rq5mr19255620pab.64.1394956807212;
        Sun, 16 Mar 2014 01:00:07 -0700 (PDT)
Original-Received: from [172.20.10.2] ([121.54.54.54])
        by mx.google.com with ESMTPSA id tu3sm53089514pab.1.2014.03.16.01.00.05
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Sun, 16 Mar 2014 01:00:06 -0700 (PDT)
In-Reply-To: <878usaa8hz.fsf@euclid.axiomatics.org>
X-Mailer: Apple Mail (2.1874)
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::22f 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:9831
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/9831>

--Apple-Mail=_1F6E5604-0410-4CF4-BB7A-1C6308A8C33F
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=ISO-8859-1


On 2014-03-16, at 3:49 PM, Gabriel Dos Reis <gdr@axiomatics.org> wrote:

> The general model of C++ templates, since day 1, is that if decl is a
> valid declaration, then
>=20
>   template <parameter-list> decl
>=20
> is also a valid declaration.

Well, Johannes' code is specifically a counterexample to that rule, because=
 the error is in the parameter-list.

It seems fairly obvious that an invalid template parameter declaration is d=
iagnosed when translating it, not at instantiation. If his code exposes a d=
efect, it belongs to name lookup, not the instantiation process. (Should th=
at name be accessible, if the template had a friend declaration? However it=
 is not a friend in the example.)

His argument, though, seems to be that there is a slippery slope of allowin=
g things that aren't specifically specified. I don't buy it.

--=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/.

--Apple-Mail=_1F6E5604-0410-4CF4-BB7A-1C6308A8C33F
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset=ISO-8859-1

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html charset=
=3Dwindows-1252"></head><body style=3D"word-wrap: break-word; -webkit-nbsp-=
mode: space; -webkit-line-break: after-white-space;"><br><div><div>On 2014&=
ndash;03&ndash;16, at 3:49 PM, Gabriel Dos Reis &lt;<a href=3D"mailto:gdr@a=
xiomatics.org">gdr@axiomatics.org</a>&gt; wrote:</div><br class=3D"Apple-in=
terchange-newline"><blockquote type=3D"cite">The general model of C++ templ=
ates, since day 1, is that if decl is a<br>valid declaration, then<br><br> =
&nbsp;&nbsp;template &lt;parameter-list&gt; decl<br><br>is also a valid dec=
laration.</blockquote><div><br></div><div>Well, Johannes&rsquo; code is spe=
cifically a counterexample to that rule, because the error is in the parame=
ter-list.</div><div><br></div><div>It seems fairly obvious that an invalid =
template parameter declaration is diagnosed when translating it, not at ins=
tantiation. If his code exposes a defect, it belongs to name lookup, not th=
e instantiation process. (<i>Should</i>&nbsp;that name be accessible, if th=
e template had a <font face=3D"Courier">friend</font> declaration? However =
it is not a <font face=3D"Courier">friend</font> in the example.)</div></di=
v><div><br></div><div>His argument, though, seems to be that there is a sli=
ppery slope of allowing things that aren&rsquo;t specifically specified. I =
don&rsquo;t buy it.</div><div><br></div></body></html>

<p></p>

-- <br />
<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 <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<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 />

--Apple-Mail=_1F6E5604-0410-4CF4-BB7A-1C6308A8C33F--

.
