220 26379 <58413fd1-653d-4171-a250-baa99c0a597b@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: Guillaume Racicot <gufideg@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: template<auto&>
Date: Sat, 25 Jun 2016 09:14:27 -0700 (PDT)
Lines: 117
Approved: news@gmane.org
Message-ID: <58413fd1-653d-4171-a250-baa99c0a597b@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_2891_887988895.1466871267830"
X-Trace: ger.gmane.org 1466871276 25220 80.91.229.3 (25 Jun 2016 16:14:36 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Sat, 25 Jun 2016 16:14:36 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBC23RWMN2YNRBZG3XK5QKGQEUPINV4Q@isocpp.org Sat Jun 25 18:14:31 2016
Return-path: <std-proposals+bncBC23RWMN2YNRBZG3XK5QKGQEUPINV4Q@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ob0-f200.google.com ([209.85.214.200])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBC23RWMN2YNRBZG3XK5QKGQEUPINV4Q@isocpp.org>)
	id 1bGqE2-0006Dl-PP
	for gclcip-std-proposals@m.gmane.org; Sat, 25 Jun 2016 18:14:30 +0200
Original-Received: by mail-ob0-f200.google.com with SMTP id at7sf237884636obd.1
        for <gclcip-std-proposals@m.gmane.org>; Sat, 25 Jun 2016 09:14:30 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=date:from:to:message-id:subject:mime-version:x-original-sender
         :reply-to:precedence:mailing-list:list-id:x-spam-checked-in-group
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=VDqMe/A7kBuSCArtribjKyFcMslim0Pt6KIzmjl9oUg=;
        b=nlhFLX7oM1cOIYTpv2nW+aPzSVmH73b9IdnCGtFpkSlIEM1xJcCfLr6uAj0s6Xp2cn
         L9wWLDxA1z+nUMJ1ESy9gaRMjm2C1LUxGtklC6Ikr6T+7lkPKYP+eNdf5gmfVp0Rlcbt
         v8m0SsP4iVmEBIzqz0SGZait2sntIhY151TbA5k/edTWBohSZhhBv9D8B0ihSTKMeX9t
         oCVjHS2mbVvAW/SIIictNKOIg843w2yVf6JnFNeyTtyvHFxJbj5mHy6EuSWcAD7E7i/d
         JcOat9o9jyJGh+Mgj/b3k9A1MNTdKOe5J5xhNjhpkVeaRH8BEVo5NXG80Nq9CV8mTXH5
         IxtQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=date:from:to:message-id:subject:mime-version:x-original-sender
         :reply-to:precedence:mailing-list:list-id:x-spam-checked-in-group
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=VDqMe/A7kBuSCArtribjKyFcMslim0Pt6KIzmjl9oUg=;
        b=Bp1Av9/rMHbHqiXiZ8OxKc2lxymiaX5acFDTdAAqFl8Sn7KBnRffNUfl7Pim0FTKc8
         daYAAWvGjaceVfrwEB2V48seNVVk8gxMIB6n/cArPqQyAW8o9F7fDmfAvOg1YQ5d4LXa
         FSql12nCjaUFcKHoKvi2mZIJBT/4vhqIywq901eigmwwjkYWwXS3zleFlyzXpspZOJOf
         TVsk1sjaKtMtZEYRJTtSikmSnca0q0aUxSxQDK0Pc/q0CxXDk8dm2q5wRD1HxtgCSJfK
         k60gBQ2hnw7gYiWYryO9Ds/mZWvaccO+f5ycWkVjcSGgqDHLPnXXnO78TeWjANha7rjQ
         IDMg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:date:from:to:message-id:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=VDqMe/A7kBuSCArtribjKyFcMslim0Pt6KIzmjl9oUg=;
        b=Ztr4uVNS39YYzv72G5E7P16UWkQ14u0RdfUgsAfKTV56+/sH461YV7WVN0hojS6dPS
         vbsKkGitXNTCEMd2ZBHmiO5ifjgGEBALZrfzyvVrAo0Dfbt2JaiVirueTwvzWzO9+LLX
         KsJ2SBvzjH7/YI6X1vH5Jw4OG/UhHko4XDJzG2EjUFGnrvjfeTyOZDqrv8ANSCIxAFaC
         dBDl3v4tWKoqSreOAGwJLKZc1P8DOILGwBzdeqSRWru6ARNoDUFjyxI7FIRidmFddOMc
         evfcrYWNOCzYa4jG9z7UtxT3PRguOsu4Yhi5lsPpcz2ITH1eHajziO62Se6iM38WHlJi
         IAkA==
X-Gm-Message-State: ALyK8tL76WVUmickybyxGq3D70lBJI3E4Ayv/THJCyK6djb412MeUepc5ZyGXI50lDbR+Q==
X-Received: by 10.157.18.215 with SMTP id g81mr9165948otg.16.1466871269899;
        Sat, 25 Jun 2016 09:14:29 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.107.131.67 with SMTP id f64ls3368698iod.73.gmail; Sat, 25 Jun
 2016 09:14:28 -0700 (PDT)
X-Received: by 10.36.213.134 with SMTP id a128mr106560itg.8.1466871268781;
        Sat, 25 Jun 2016 09:14:28 -0700 (PDT)
X-Original-Sender: gufideg@gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Spam-Checked-In-Group: 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:26379
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/26379>

------=_Part_2891_887988895.1466871267830
Content-Type: multipart/alternative; 
	boundary="----=_Part_2892_1965327228.1466871267830"

------=_Part_2892_1965327228.1466871267830
Content-Type: text/plain; charset=UTF-8

After reading P0127R1 
<http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0127r1.html>, I 
wondered if auto& as a template parameter is be possible too. It would 
allow things like this:

template<auto& thing>
struct Foo {
    void display() {
        std::cout << "value: " << thing << " address: " << &thing << std::
endl;
    }
};

extern int i;

Foo<i> foo;

Is this thing already possible in the current proposal?

-- 
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/58413fd1-653d-4171-a250-baa99c0a597b%40isocpp.org.

------=_Part_2892_1965327228.1466871267830
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">After reading=C2=A0<a href=3D"http://www.open-std.org/jtc1=
/sc22/wg21/docs/papers/2016/p0127r1.html">P0127R1</a>, I wondered if auto&a=
mp; as a template parameter is be possible too. It would allow things like =
this:<div><br></div><div class=3D"prettyprint" style=3D"border: 1px solid r=
gb(187, 187, 187); word-wrap: break-word; background-color: rgb(250, 250, 2=
50);"><code class=3D"prettyprint"><div class=3D"subprettyprint"><span style=
=3D"color: #008;" class=3D"styled-by-prettify">template</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span style=3D"co=
lor: #008;" class=3D"styled-by-prettify">auto</span><span style=3D"color: #=
660;" class=3D"styled-by-prettify">&amp;</span><span style=3D"color: #000;"=
 class=3D"styled-by-prettify"> thing</span><span style=3D"color: #660;" cla=
ss=3D"styled-by-prettify">&gt;</span><span style=3D"color: #000;" class=3D"=
styled-by-prettify"><br></span><span style=3D"color: #008;" class=3D"styled=
-by-prettify">struct</span><span style=3D"color: #000;" class=3D"styled-by-=
prettify"> </span><span style=3D"color: #606;" class=3D"styled-by-prettify"=
>Foo</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </spa=
n><span style=3D"color: #660;" class=3D"styled-by-prettify">{</span><span s=
tyle=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 </span=
><span style=3D"color: #008;" class=3D"styled-by-prettify">void</span><span=
 style=3D"color: #000;" class=3D"styled-by-prettify"> display</span><span s=
tyle=3D"color: #660;" class=3D"styled-by-prettify">()</span><span style=3D"=
color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #6=
60;" class=3D"styled-by-prettify">{</span><span style=3D"color: #000;" clas=
s=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 std</span><span st=
yle=3D"color: #660;" class=3D"styled-by-prettify">::</span><span style=3D"c=
olor: #000;" class=3D"styled-by-prettify">cout </span><span style=3D"color:=
 #660;" class=3D"styled-by-prettify">&lt;&lt;</span><span style=3D"color: #=
000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #080;" cla=
ss=3D"styled-by-prettify">&quot;value: &quot;</span><span style=3D"color: #=
000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #660;" cla=
ss=3D"styled-by-prettify">&lt;&lt;</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> thing </span><span style=3D"color: #660;" class=3D=
"styled-by-prettify">&lt;&lt;</span><span style=3D"color: #000;" class=3D"s=
tyled-by-prettify"> </span><span style=3D"color: #080;" class=3D"styled-by-=
prettify">&quot; address: &quot;</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> </span><span style=3D"color: #660;" class=3D"style=
d-by-prettify">&lt;&lt;</span><span style=3D"color: #000;" class=3D"styled-=
by-prettify"> </span><span style=3D"color: #660;" class=3D"styled-by-pretti=
fy">&amp;</span><span style=3D"color: #000;" class=3D"styled-by-prettify">t=
hing </span><span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;&=
lt;</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> std</s=
pan><span style=3D"color: #660;" class=3D"styled-by-prettify">::</span><spa=
n style=3D"color: #000;" class=3D"styled-by-prettify">endl</span><span styl=
e=3D"color: #660;" class=3D"styled-by-prettify">;</span><span style=3D"colo=
r: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 </span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">}</span><span style=3D"color=
: #000;" class=3D"styled-by-prettify"><br></span><span style=3D"color: #660=
;" class=3D"styled-by-prettify">};</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"><br><br></span><span style=3D"color: #008;" class=
=3D"styled-by-prettify">extern</span><span style=3D"color: #000;" class=3D"=
styled-by-prettify"> </span><span style=3D"color: #008;" class=3D"styled-by=
-prettify">int</span><span style=3D"color: #000;" class=3D"styled-by-pretti=
fy"> i</span><span style=3D"color: #660;" class=3D"styled-by-prettify">;</s=
pan><span style=3D"color: #000;" class=3D"styled-by-prettify"><br><br></spa=
n><span style=3D"color: #606;" class=3D"styled-by-prettify">Foo</span><span=
 style=3D"color: #080;" class=3D"styled-by-prettify">&lt;i&gt;</span><span =
style=3D"color: #000;" class=3D"styled-by-prettify"> foo</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">;</span></div></code></div><=
div><br></div><div>Is this thing already possible in the current proposal?<=
/div></div>

<p></p>

-- <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 />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/58413fd1-653d-4171-a250-baa99c0a597b%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/58413fd1-653d-4171-a250-baa99c0a597b=
%40isocpp.org</a>.<br />

------=_Part_2892_1965327228.1466871267830--

------=_Part_2891_887988895.1466871267830--

.
