220 16723 <66d5a2c4-5572-413c-adc0-b6afd7f5ff01@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: Scott Prager <splinterofchaos@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.general,gmane.comp.lang.c++.isocpp.proposals
Subject: Re: An implementation of enhanced auto deduction and
 abbreviated template syntax using Clang
Date: Wed, 4 Mar 2015 08:52:50 -0800 (PST)
Lines: 337
Approved: news@gmane.org
Message-ID: <66d5a2c4-5572-413c-adc0-b6afd7f5ff01@isocpp.org>
References: <CABsSThrwV0UCbrmoxoeQUskOjvF2+RX5ctpSq3dPMPxm=t6mww@mail.gmail.com>
Reply-To: std-discussion@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_337_334394783.1425487970241"
X-Trace: ger.gmane.org 1425487981 23261 80.91.229.3 (4 Mar 2015 16:53:01 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Wed, 4 Mar 2015 16:53:01 +0000 (UTC)
Cc: std-discussion@isocpp.org, c++std-core@accu.org, faisalv@gmail.com
To: std-proposals@isocpp.org
Original-X-From: std-discussion+bncBCU6PTE6UUGBBYXQ3STQKGQEPISOWRY@isocpp.org Wed Mar 04 17:52:55 2015
Return-path: <std-discussion+bncBCU6PTE6UUGBBYXQ3STQKGQEPISOWRY@isocpp.org>
Envelope-to: gclcig-std-discussion@m.gmane.org
Original-Received: from mail-qa0-f70.google.com ([209.85.216.70])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-discussion+bncBCU6PTE6UUGBBYXQ3STQKGQEPISOWRY@isocpp.org>)
	id 1YTCXU-0002i2-1Y
	for gclcig-std-discussion@m.gmane.org; Wed, 04 Mar 2015 17:52:52 +0100
Original-Received: by mail-qa0-f70.google.com with SMTP id bm13sf143967373qab.1
        for <gclcig-std-discussion@m.gmane.org>; Wed, 04 Mar 2015 08:52:51 -0800 (PST)
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:cc:message-id:in-reply-to
         :references:subject:mime-version:content-type:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe;
        bh=e+UU1XfbI7N/GJJ3XfFAqpHZEKd8UXgUveveu9cxxio=;
        b=NS99cXKt6H/fJqhnGt7mbP1SjrNRhCHzVYFkQI19movYp5lMv+Q6azkI0fUmrxPaEL
         UxbCf0N71kxVVinXesXHL9sz6RUBl485AneCWmFwfbgA5DJKLlwx8M5w24Vf/gX8MZE7
         0QMBYn8K/tfVYArhn0ZNOGSCep2XKlcf8Ho3Fd9vW01z2m0sI7DdHMjVKQy99q+OFaV2
         iJGlMFtU+vb//zgTvs+kNP5rteiNjpSyXAC3IgZDRC72fI9JT0+xoSuYpOh+9aYNGOPA
         t3uEGAqAbCxr2Ec9ZMkXWSeJoqhPpmuk3CpHdKYn7Qq4eAkSMu0kWM57CjhA5FwR/5Km
         S5+A==
X-Gm-Message-State: ALoCoQlGo0IRgzY3tZGrMU4nUKHAzxW79Cjsck5e3dCv6oVVJzIBds5a/qtZCEKynesZHtMBlXID
X-Received: by 10.236.26.17 with SMTP id b17mr5423965yha.15.1425487971150;
        Wed, 04 Mar 2015 08:52:51 -0800 (PST)
X-BeenThere: std-discussion@isocpp.org
Original-Received: by 10.182.97.73 with SMTP id dy9ls267643obb.2.gmail; Wed, 04 Mar
 2015 08:52:50 -0800 (PST)
X-Received: by 10.182.249.102 with SMTP id yt6mr3760190obc.30.1425487970708;
        Wed, 04 Mar 2015 08:52:50 -0800 (PST)
Original-Received: from mail-ob0-x23c.google.com (mail-ob0-x23c.google.com. [2607:f8b0:4003:c01::23c])
        by mx.google.com with ESMTPS id o11si2408172obr.104.2015.03.04.08.52.50
        for <std-discussion@isocpp.org>
        (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Wed, 04 Mar 2015 08:52:50 -0800 (PST)
Received-SPF: pass (google.com: domain of splinterofchaos@gmail.com designates 2607:f8b0:4003:c01::23c as permitted sender) client-ip=2607:f8b0:4003:c01::23c;
Original-Received: by obbnt9 with SMTP id nt9so2305907obb.9
        for <std-discussion@isocpp.org>; Wed, 04 Mar 2015 08:52:50 -0800 (PST)
X-Received: by 10.140.20.247 with SMTP id 110mr93141qgj.17.1425487970613;
        Wed, 04 Mar 2015 08:52:50 -0800 (PST)
In-Reply-To: <CABsSThrwV0UCbrmoxoeQUskOjvF2+RX5ctpSq3dPMPxm=t6mww@mail.gmail.com>
X-Original-Sender: SplinterOfChaos@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of splinterofchaos@gmail.com designates 2607:f8b0:4003:c01::23c as
 permitted sender) smtp.mail=splinterofchaos@gmail.com;       dkim=pass
 header.i=@gmail.com;       dmarc=pass (p=NONE dis=NONE) header.from=gmail.com
Precedence: list
Mailing-list: list std-discussion@isocpp.org; contact std-discussion+owners@isocpp.org
List-ID: <std-discussion.isocpp.org>
X-Google-Group-Id: 495566654649
List-Post: <http://groups.google.com/a/isocpp.org/group/std-discussion/post>, <mailto:std-discussion@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-discussion+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-discussion/>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-discussion/subscribe>,
 <mailto:std-discussion+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+495566654649+unsubscribe@googlegroups.com>,
 <http://groups.google.com/a/isocpp.org/group/std-discussion/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.general:4961 gmane.comp.lang.c++.isocpp.proposals:16723
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.general/4961>

------=_Part_337_334394783.1425487970241
Content-Type: multipart/alternative; 
	boundary="----=_Part_338_208413682.1425487970241"

------=_Part_338_208413682.1425487970241
Content-Type: text/plain; charset=UTF-8

Great stuff! No more writing *is_tuple* and *is_pair* functions to get
SFINAE overloading. Although, a few things get me...

(sorry, the code formatter isn't working for me right now)

/// TEST
*template<class X>*
*void check(auto&& x) {*
* static_assert(std::is_same<decltype(x), X&&>::value);*
*}*

*template<class X>*
*void check_copy(auto x) {*
* static_assert(std::is_same<decltype(x), X>::value);*
*}*

*//...*

*int one;*
*const int cone = 1;*
*check<int>(1);*
*check<int&>(one);*
*check<const int&>(cone);*

*check_copy<int>(1);*
*check_copy<int>(one);*
*check_copy<int>(cone);*
/// END TEST

So, this check shows that when used as a function parameter,
auto behaves very similarly to auto-initializing a variable.

/// TEST
*std::pair<auto...> p = std::pair<int, int>(1,1);*
*std::pair<auto...> q = std::pair<int&, int&>(one,one);*
*std::pair<auto...> r = std::pair<int&&, int&&>(1,1);*

*template<class X> using P = std::pair<X,X>&;*
*check<P<int>>(p);*
*check<P<int&>>(q);*
*check<P<int&&>>(r);*
/// END TEST

This should that *auto* as a template parameter works consistently in
that *tuple<T>* would bind to a reference or rvlaue as well. I tested
*auto& *and *auto&&* in this context as well, and they match against
references and rvalues like template parameters.

*void check_pair(std::pair<auto&&, auto&&>) { static_assert(true); }*

Particularly, this will only work if passed a *pair<X&&, Y&&> *with 
*std::move*...
While it's entirely consistent with the rest of the language, it just
seems odd that *auto* in one instance decays the type and in another
acts like *decltype(auto)*. Not a complaint, just an observation.


On Tuesday, March 3, 2015 at 9:39:49 PM UTC-5, faisalv wrote:
>
> In the hopes of soliciting constructive feedback, if anyone has the 
> time or the interest to play with a patched up Clang that implements 
> enhanced auto deduction & abbreviated template syntax from the 
> concepts ts, here it is: 
>
> https://github.com/faisalv/clang/tree/enhanced-auto-c%2B%2B1z . 
>
> The last line of the README file tells you the subversion revision of 
> LLVM to use. 
>
> For examples of test cases that successfully compile, please refer to: 
>  -- 
> https://github.com/faisalv/clang/blob/enhanced-auto-c%2B%2B1z/test/CXX/auto/cxx1z-auto-vars-generalized.cpp 
>  -- 
> https://github.com/faisalv/clang/blob/enhanced-auto-c%2B%2B1z/test/CXX/auto/cxx1z-abbreviated-templates.cpp 
>
> I would certainly appreciate the feedback! 
>
> 1) Enhanced-Auto Deduction: 
>
>  pair<auto...> f() { return make_pair([] { }, [] { }); } 
>  vector<auto> v = vector<int>(); 
>
> 2) Abbreviated Template Syntax: 
> void f(auto) <=> template<class T> void f(T); 
>
>
> A few, perhaps not so obvious or interesting, technicalities: 
>
> a)  The equivalence of templates when it comes to trailing return 
> types in function pointer parameters is based on the order of the 
> 'auto' that signifies a placeholder, not just the appearance of an 
> auto in the declaration-specifier of a parameter: 
>
>     template<class R, class P> void f( R(P) );  // #1 
>     template<class P, class R> void f(  R(P) );  // #2 (order of 
> templ-params flipped) 
>
>     template<class R, class P> void f( auto (P)->R); // equivalent to 
> #1, not abbreviated. 
>     void f(auto(auto));  // equivalent to #1 
>     void f(auto (auto) -> auto); // equivalent to #2 
>                                                // the trailing return type 
> auto 
>                                                // identifies a 
> template parameter 
>     template<class R> void f(R(auto); // equivalent to #1 
>     template<class P> void f(auto(P)); // equivalent to #2 
>
> b) variadic auto 
>     Once an ellipsis is seen as part of the declarator, all contained 
> auto placeholders get transformed into parameter packs. 
>     void f(auto (*...)(auto) -> std::tuple<auto, std::pair<auto, 
> auto>...>); 
>  Note there are 4 deducible template parameter packs above. 
>
> c) multi abbreviated template declarations 
>    void f(auto), g(auto); 
> are allowed - the above declares two function templates. 
>
> d) template aliases desugar their types *after* each auto has been 
> identified as a placeholder (and so must be deduced) 
>
>     template<class T> using Int = int; 
>     Int<auto> i = 3; // Is an error, auto must be deducible. 
>
> e) generic lambda's as default arguments work with abbreviated template 
> syntax: 
>   void f(int (*)(int) = [](auto a) { return a; }, auto b = decltype(b){}); 
>   f<float*>(); // OK 
>
> f) variable templates and enhanced auto deduction interact as expected: 
>     template<class T> pair<auto...> (*vfp)(auto...) = [](T t1, T* t2) 
> { return make_pair(t1, t2); }; 
>
> Thanks! 
> Faisal Vali 
>

-- 

--- 
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-discussion+unsubscribe@isocpp.org.
To post to this group, send email to std-discussion@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-discussion/.

------=_Part_338_208413682.1425487970241
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Great stuff! No more writing <i>is_tuple</i>&nbsp;and <i>i=
s_pair</i>&nbsp;functions to get<div>SFINAE overloading. Although, a few th=
ings get me...</div><div><br></div><div>(sorry, the code formatter isn't wo=
rking for me right now)</div><div><br></div><div>/// TEST</div><div><div><i=
>template&lt;class X&gt;</i></div><div><i>void check(auto&amp;&amp; x) {</i=
></div><div><i><span class=3D"Apple-tab-span" style=3D"white-space:pre">	</=
span>static_assert(std::is_same&lt;decltype(x), X&amp;&amp;&gt;::value);</i=
></div><div><i>}</i></div><div><i><br></i></div><div><i>template&lt;class X=
&gt;</i></div><div><i>void check_copy(auto x) {</i></div><div><i><span clas=
s=3D"Apple-tab-span" style=3D"white-space:pre">	</span>static_assert(std::i=
s_same&lt;decltype(x), X&gt;::value);</i></div><div><i>}</i></div><div><i><=
br></i></div><div><i>//...</i></div><div><i><br></i></div><div><div><i>int =
one;</i></div><div><i>const int cone =3D 1;</i></div><div><i>check&lt;int&g=
t;(1);</i></div><div><i>check&lt;int&amp;&gt;(one);</i></div><div><i>check&=
lt;const int&amp;&gt;(cone);</i></div><div><i><br></i></div><div><i>check_c=
opy&lt;int&gt;(1);</i></div><div><i>check_copy&lt;int&gt;(one);</i></div><d=
iv><i>check_copy&lt;int&gt;(cone);</i></div><div>/// END TEST</div></div><d=
iv><br></div><div>So, this check shows that when used as a function paramet=
er,</div><div>auto behaves very similarly to auto-initializing a variable.<=
/div><div><br></div><div>/// TEST</div><div><div><div><i>std::pair&lt;auto.=
...&gt; p =3D std::pair&lt;int, int&gt;(1,1);</i></div><div><i>std::pair&lt;=
auto...&gt; q =3D std::pair&lt;int&amp;, int&amp;&gt;(one,one);</i></div><d=
iv><i>std::pair&lt;auto...&gt; r =3D std::pair&lt;int&amp;&amp;, int&amp;&a=
mp;&gt;(1,1);</i></div><div><i><br></i></div><div><i>template&lt;class X&gt=
; using P =3D std::pair&lt;X,X&gt;&amp;;</i></div><div><i>check&lt;P&lt;int=
&gt;&gt;(p);</i></div><div><i>check&lt;P&lt;int&amp;&gt;&gt;(q);</i></div><=
div><i>check&lt;P&lt;int&amp;&amp;&gt;&gt;(r);</i></div></div><div>/// END =
TEST</div></div><div><br></div><div>This should that <i>auto</i>&nbsp;as a =
template parameter works consistently in</div><div>that <i>tuple&lt;T&gt;</=
i>&nbsp;would bind to a reference or rvlaue as well. I tested</div><div><i>=
auto&amp; </i>and <i>auto&amp;&amp;</i>&nbsp;in this context as well, and t=
hey match against</div><div>references and rvalues like template parameters=
..</div><div><br></div><div><div><i>void check_pair(std::pair&lt;auto&amp;&a=
mp;, auto&amp;&amp;&gt;) { static_assert(true); }</i></div></div><div><br><=
/div><div>Particularly, this will only work if passed a <i>pair&lt;X&amp;&a=
mp;, Y&amp;&amp;&gt; </i>with <i>std::move</i>...</div><div>While it's enti=
rely consistent with the rest of the language, it just</div><div>seems odd =
that <i>auto</i>&nbsp;in one instance decays the type and in another</div><=
div>acts like <i>decltype(auto)</i>. Not a complaint, just an observation.<=
/div><div><br></div><br>On Tuesday, March 3, 2015 at 9:39:49 PM UTC-5, fais=
alv wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left:=
 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">In the hopes of soli=
citing constructive feedback, if anyone has the
<br>time or the interest to play with a patched up Clang that implements
<br>enhanced auto deduction &amp; abbreviated template syntax from the
<br>concepts ts, here it is:
<br>
<br><a href=3D"https://github.com/faisalv/clang/tree/enhanced-auto-c%2B%2B1=
z" target=3D"_blank" rel=3D"nofollow" onmousedown=3D"this.href=3D'https://w=
ww.google.com/url?q\75https%3A%2F%2Fgithub.com%2Ffaisalv%2Fclang%2Ftree%2Fe=
nhanced-auto-c%252B%252B1z\46sa\75D\46sntz\0751\46usg\75AFQjCNF797qFdVpxoz9=
OgazeR_JgUA4ESA';return true;" onclick=3D"this.href=3D'https://www.google.c=
om/url?q\75https%3A%2F%2Fgithub.com%2Ffaisalv%2Fclang%2Ftree%2Fenhanced-aut=
o-c%252B%252B1z\46sa\75D\46sntz\0751\46usg\75AFQjCNF797qFdVpxoz9OgazeR_JgUA=
4ESA';return true;">https://github.com/faisalv/<wbr>clang/tree/enhanced-aut=
o-c%2B%<wbr>2B1z</a> .
<br>
<br>The last line of the README file tells you the subversion revision of
<br>LLVM to use.
<br>
<br>For examples of test cases that successfully compile, please refer to:
<br>&nbsp;-- <a href=3D"https://github.com/faisalv/clang/blob/enhanced-auto=
-c%2B%2B1z/test/CXX/auto/cxx1z-auto-vars-generalized.cpp" target=3D"_blank"=
 rel=3D"nofollow" onmousedown=3D"this.href=3D'https://www.google.com/url?q\=
75https%3A%2F%2Fgithub.com%2Ffaisalv%2Fclang%2Fblob%2Fenhanced-auto-c%252B%=
252B1z%2Ftest%2FCXX%2Fauto%2Fcxx1z-auto-vars-generalized.cpp\46sa\75D\46snt=
z\0751\46usg\75AFQjCNHBhcz2hwtgv4D3zfU62V7DnwgxMg';return true;" onclick=3D=
"this.href=3D'https://www.google.com/url?q\75https%3A%2F%2Fgithub.com%2Ffai=
salv%2Fclang%2Fblob%2Fenhanced-auto-c%252B%252B1z%2Ftest%2FCXX%2Fauto%2Fcxx=
1z-auto-vars-generalized.cpp\46sa\75D\46sntz\0751\46usg\75AFQjCNHBhcz2hwtgv=
4D3zfU62V7DnwgxMg';return true;">https://github.com/faisalv/<wbr>clang/blob=
/enhanced-auto-c%2B%<wbr>2B1z/test/CXX/auto/cxx1z-auto-<wbr>vars-generalize=
d.cpp</a>
<br>&nbsp;-- <a href=3D"https://github.com/faisalv/clang/blob/enhanced-auto=
-c%2B%2B1z/test/CXX/auto/cxx1z-abbreviated-templates.cpp" target=3D"_blank"=
 rel=3D"nofollow" onmousedown=3D"this.href=3D'https://www.google.com/url?q\=
75https%3A%2F%2Fgithub.com%2Ffaisalv%2Fclang%2Fblob%2Fenhanced-auto-c%252B%=
252B1z%2Ftest%2FCXX%2Fauto%2Fcxx1z-abbreviated-templates.cpp\46sa\75D\46snt=
z\0751\46usg\75AFQjCNEuB7QcHoYCbeatC5gyJAMXDpbXWQ';return true;" onclick=3D=
"this.href=3D'https://www.google.com/url?q\75https%3A%2F%2Fgithub.com%2Ffai=
salv%2Fclang%2Fblob%2Fenhanced-auto-c%252B%252B1z%2Ftest%2FCXX%2Fauto%2Fcxx=
1z-abbreviated-templates.cpp\46sa\75D\46sntz\0751\46usg\75AFQjCNEuB7QcHoYCb=
eatC5gyJAMXDpbXWQ';return true;">https://github.com/faisalv/<wbr>clang/blob=
/enhanced-auto-c%2B%<wbr>2B1z/test/CXX/auto/cxx1z-<wbr>abbreviated-template=
s.cpp</a>
<br>
<br>I would certainly appreciate the feedback!
<br>
<br>1) Enhanced-Auto Deduction:
<br>
<br>&nbsp;pair&lt;auto...&gt; f() { return make_pair([] { }, [] { }); }
<br>&nbsp;vector&lt;auto&gt; v =3D vector&lt;int&gt;();
<br>
<br>2) Abbreviated Template Syntax:
<br>void f(auto) &lt;=3D&gt; template&lt;class T&gt; void f(T);
<br>
<br>
<br>A few, perhaps not so obvious or interesting, technicalities:
<br>
<br>a) &nbsp;The equivalence of templates when it comes to trailing return
<br>types in function pointer parameters is based on the order of the
<br>'auto' that signifies a placeholder, not just the appearance of an
<br>auto in the declaration-specifier of a parameter:
<br>
<br>&nbsp; &nbsp; template&lt;class R, class P&gt; void f( R(P) ); &nbsp;//=
 #1
<br>&nbsp; &nbsp; template&lt;class P, class R&gt; void f( &nbsp;R(P) ); &n=
bsp;// #2 (order of
<br>templ-params flipped)
<br>
<br>&nbsp; &nbsp; template&lt;class R, class P&gt; void f( auto (P)-&gt;R);=
 // equivalent to
<br>#1, not abbreviated.
<br>&nbsp; &nbsp; void f(auto(auto)); &nbsp;// equivalent to #1
<br>&nbsp; &nbsp; void f(auto (auto) -&gt; auto); // equivalent to #2
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &=
nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;=
 &nbsp; &nbsp; &nbsp;// the trailing return type auto
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &=
nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;=
 &nbsp; &nbsp; &nbsp;// identifies a
<br>template parameter
<br>&nbsp; &nbsp; template&lt;class R&gt; void f(R(auto); // equivalent to =
#1
<br>&nbsp; &nbsp; template&lt;class P&gt; void f(auto(P)); // equivalent to=
 #2
<br>
<br>b) variadic auto
<br>&nbsp; &nbsp; Once an ellipsis is seen as part of the declarator, all c=
ontained
<br>auto placeholders get transformed into parameter packs.
<br>&nbsp; &nbsp; void f(auto (*...)(auto) -&gt; std::tuple&lt;auto, std::p=
air&lt;auto, auto&gt;...&gt;);
<br>&nbsp;Note there are 4 deducible template parameter packs above.
<br>
<br>c) multi abbreviated template declarations
<br>&nbsp; &nbsp;void f(auto), g(auto);
<br>are allowed - the above declares two function templates.
<br>
<br>d) template aliases desugar their types *after* each auto has been
<br>identified as a placeholder (and so must be deduced)
<br>
<br>&nbsp; &nbsp; template&lt;class T&gt; using Int =3D int;
<br>&nbsp; &nbsp; Int&lt;auto&gt; i =3D 3; // Is an error, auto must be ded=
ucible.
<br>
<br>e) generic lambda's as default arguments work with abbreviated template=
 syntax:
<br>&nbsp; void f(int (*)(int) =3D [](auto a) { return a; }, auto b =3D dec=
ltype(b){});
<br>&nbsp; f&lt;float*&gt;(); // OK
<br>
<br>f) variable templates and enhanced auto deduction interact as expected:
<br>&nbsp; &nbsp; template&lt;class T&gt; pair&lt;auto...&gt; (*vfp)(auto..=
..) =3D [](T t1, T* t2)
<br>{ return make_pair(t1, t2); };
<br>
<br>Thanks!
<br>Faisal Vali
<br></blockquote></div></div>

<p></p>

-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Discussion&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-discussion+unsubscribe@isocpp.org">std-discus=
sion+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-discussion@isocp=
p.org">std-discussion@isocpp.org</a>.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-discussion/">http://groups.google.com/a/isocpp.org/group/std-discussion=
/</a>.<br />

------=_Part_338_208413682.1425487970241--
------=_Part_337_334394783.1425487970241--

.
