Topic: Proposal idea: Allow auto template parameters for
Author: kamikaze@bsdforen.de
Date: Thu, 17 Mar 2016 06:28:52 -0700 (PDT)
Raw View
------=_Part_48_1156644474.1458221332842
Content-Type: multipart/alternative;
boundary="----=_Part_49_573067018.1458221332842"
------=_Part_49_573067018.1458221332842
Content-Type: text/plain; charset=UTF-8
I have a parser where I use the following pattern.
E.g. I have a function template foo():
template <class EnumT>
struct foo_result;
template <class EnumT>
using foo_result_t = typename foo_result::type;
template <class EnumT, EnumT EnumVal>
foo_result_t<EnumT> foo();
The template can be used like this:
enum class Foo {
LEFT, RIGHT, CENTRE
};
template <>
struct foo_result<Foo> { using type = double; }
template <>
double foo<Foo, Foo::LEFT>() {
// do stuff
}
template <>
double foo<Foo, Foo::RIGHT>() {
// do stuff
}
template <>
double foo<Foo, Foo::CENTRE>() {
// do stuff
}
As you can see the type information is redundant here. My proposal would be
to allow:
template <auto EnumVal, class EnumT = decltype(EnumVal)>
result_t<EnumT> foo();
The specialisation and function calls now only need a single argument:
template <>
double foo<Foo::LEFT>() {
// do stuff
}
The idea here is to remove the redundancy and simplify specialising and
calling of the function template.
--
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/6920af70-300e-4d2a-9400-4e2617d2c739%40isocpp.org.
------=_Part_49_573067018.1458221332842
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">I have a parser where I use the following pattern.<br><br>=
E.g. I have a function template foo():<br><br><code class=3D"prettyprint"><=
div class=3D"prettyprint" style=3D"background-color: rgb(250, 250, 250); bo=
rder-color: rgb(187, 187, 187); border-style: solid; border-width: 1px; wor=
d-wrap: break-word;"><code class=3D"prettyprint"><div class=3D"subprettypri=
nt"><span style=3D"color: #008;" class=3D"styled-by-prettify">template</spa=
n><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span s=
tyle=3D"color: #660;" class=3D"styled-by-prettify"><</span><span style=
=3D"color: #008;" class=3D"styled-by-prettify">class</span><span style=3D"c=
olor: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #60=
6;" class=3D"styled-by-prettify">EnumT</span><span style=3D"color: #660;" c=
lass=3D"styled-by-prettify">></span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"><br></span><span style=3D"color: #008;" class=3D"st=
yled-by-prettify">struct</span><span style=3D"color: #000;" class=3D"styled=
-by-prettify"> foo_result</span><span style=3D"color: #660;" class=3D"style=
d-by-prettify">;</span><span style=3D"color: #000;" class=3D"styled-by-pret=
tify"><br><br></span><span style=3D"color: #008;" class=3D"styled-by-pretti=
fy">template</span><span style=3D"color: #000;" class=3D"styled-by-prettify=
"> </span><span style=3D"color: #660;" class=3D"styled-by-prettify"><</s=
pan><span style=3D"color: #008;" class=3D"styled-by-prettify">class</span><=
span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span styl=
e=3D"color: #606;" class=3D"styled-by-prettify">EnumT</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: #008;=
" class=3D"styled-by-prettify">using</span><span style=3D"color: #000;" cla=
ss=3D"styled-by-prettify"> foo_result_t </span><span style=3D"color: #660;"=
class=3D"styled-by-prettify">=3D</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> </span><span style=3D"color: #008;" class=3D"style=
d-by-prettify">typename</span><span style=3D"color: #000;" class=3D"styled-=
by-prettify"> foo_result</span><span style=3D"color: #660;" class=3D"styled=
-by-prettify">::</span><span style=3D"color: #000;" class=3D"styled-by-pret=
tify">type</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">template</s=
pan><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span=
style=3D"color: #660;" class=3D"styled-by-prettify"><</span><span style=
=3D"color: #008;" class=3D"styled-by-prettify">class</span><span style=3D"c=
olor: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #60=
6;" class=3D"styled-by-prettify">EnumT</span><span style=3D"color: #660;" c=
lass=3D"styled-by-prettify">,</span><span style=3D"color: #000;" class=3D"s=
tyled-by-prettify"> </span><span style=3D"color: #606;" class=3D"styled-by-=
prettify">EnumT</span><span style=3D"color: #000;" class=3D"styled-by-prett=
ify"> </span><span style=3D"color: #606;" class=3D"styled-by-prettify">Enum=
Val</span><span style=3D"color: #660;" class=3D"styled-by-prettify">></s=
pan><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>foo_resul=
t_t</span><span style=3D"color: #660;" class=3D"styled-by-prettify"><</s=
pan><span style=3D"color: #606;" class=3D"styled-by-prettify">EnumT</span><=
span style=3D"color: #660;" class=3D"styled-by-prettify">></span><span s=
tyle=3D"color: #000;" class=3D"styled-by-prettify"> foo</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">();</span><span style=3D"col=
or: #000;" class=3D"styled-by-prettify"><br></span></div></code></div><br>T=
he template can be used like this:<br><br><div class=3D"prettyprint" style=
=3D"background-color: rgb(250, 250, 250); border-color: rgb(187, 187, 187);=
border-style: solid; border-width: 1px; word-wrap: break-word;"><code clas=
s=3D"prettyprint"><div class=3D"subprettyprint"><span style=3D"color: #008;=
" class=3D"styled-by-prettify">enum</span><span style=3D"color: #000;" clas=
s=3D"styled-by-prettify"> </span><span style=3D"color: #008;" class=3D"styl=
ed-by-prettify">class</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"> </sp=
an><span style=3D"color: #660;" class=3D"styled-by-prettify">{</span><span =
style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 LEFT<=
/span><span style=3D"color: #660;" class=3D"styled-by-prettify">,</span><sp=
an style=3D"color: #000;" class=3D"styled-by-prettify"> RIGHT</span><span s=
tyle=3D"color: #660;" class=3D"styled-by-prettify">,</span><span style=3D"c=
olor: #000;" class=3D"styled-by-prettify"> CENTRE<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: #00=
8;" class=3D"styled-by-prettify">template</span><span style=3D"color: #000;=
" class=3D"styled-by-prettify"> </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: #008;" class=3D"st=
yled-by-prettify">struct</span><span style=3D"color: #000;" class=3D"styled=
-by-prettify"> foo_result</span><span style=3D"color: #660;" class=3D"style=
d-by-prettify"><</span><span style=3D"color: #606;" class=3D"styled-by-p=
rettify">Foo</span><span style=3D"color: #660;" class=3D"styled-by-prettify=
">></span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </s=
pan><span style=3D"color: #660;" class=3D"styled-by-prettify">{</span><span=
style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D=
"color: #008;" class=3D"styled-by-prettify">using</span><span style=3D"colo=
r: #000;" class=3D"styled-by-prettify"> type </span><span style=3D"color: #=
660;" class=3D"styled-by-prettify">=3D</span><span style=3D"color: #000;" c=
lass=3D"styled-by-prettify"> </span><span style=3D"color: #008;" class=3D"s=
tyled-by-prettify">double</span><span style=3D"color: #660;" class=3D"style=
d-by-prettify">;</span><span style=3D"color: #000;" class=3D"styled-by-pret=
tify"> </span><span style=3D"color: #660;" class=3D"styled-by-prettify">}</=
span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br><br></sp=
an><span style=3D"color: #008;" class=3D"styled-by-prettify">template</span=
><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span st=
yle=3D"color: #660;" class=3D"styled-by-prettify"><></span><span styl=
e=3D"color: #000;" class=3D"styled-by-prettify"><br></span><span style=3D"c=
olor: #008;" class=3D"styled-by-prettify">double</span><span style=3D"color=
: #000;" class=3D"styled-by-prettify"> foo</span><span style=3D"color: #660=
;" class=3D"styled-by-prettify"><</span><span style=3D"color: #606;" cla=
ss=3D"styled-by-prettify">Foo</span><span style=3D"color: #660;" class=3D"s=
tyled-by-prettify">,</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: #660;" class=3D"styled-by-prettify">::</sp=
an><span style=3D"color: #000;" class=3D"styled-by-prettify">LEFT</span><sp=
an style=3D"color: #660;" class=3D"styled-by-prettify">>()</span><span s=
tyle=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"c=
olor: #660;" class=3D"styled-by-prettify">{</span><span style=3D"color: #00=
0;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 </span><span style=3D"co=
lor: #800;" class=3D"styled-by-prettify">// do stuff</span><span style=3D"c=
olor: #000;" class=3D"styled-by-prettify"><br></span><span style=3D"color: =
#660;" class=3D"styled-by-prettify">}</span><span style=3D"color: #000;" cl=
ass=3D"styled-by-prettify"><br><br></span><span style=3D"color: #008;" clas=
s=3D"styled-by-prettify">template</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> </span><span style=3D"color: #660;" class=3D"style=
d-by-prettify"><></span><span style=3D"color: #000;" class=3D"styled-=
by-prettify"><br></span><span style=3D"color: #008;" class=3D"styled-by-pre=
ttify">double</span><span style=3D"color: #000;" class=3D"styled-by-prettif=
y"> foo</span><span style=3D"color: #660;" class=3D"styled-by-prettify"><=
;</span><span style=3D"color: #606;" class=3D"styled-by-prettify">Foo</span=
><span style=3D"color: #660;" class=3D"styled-by-prettify">,</span><span st=
yle=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"co=
lor: #606;" class=3D"styled-by-prettify">Foo</span><span style=3D"color: #6=
60;" class=3D"styled-by-prettify">::</span><span style=3D"color: #000;" cla=
ss=3D"styled-by-prettify">RIGHT</span><span style=3D"color: #660;" class=3D=
"styled-by-prettify">>()</span><span style=3D"color: #000;" class=3D"sty=
led-by-prettify"> </span><span style=3D"color: #660;" class=3D"styled-by-pr=
ettify">{</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><=
br>=C2=A0 =C2=A0 </span><span style=3D"color: #800;" class=3D"styled-by-pre=
ttify">// do stuff</span><span style=3D"color: #000;" class=3D"styled-by-pr=
ettify"><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">template<=
/span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><sp=
an 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: #008;" class=3D"styled-by-prettify">double</span><span style=3D"=
color: #000;" class=3D"styled-by-prettify"> foo</span><span style=3D"color:=
#660;" class=3D"styled-by-prettify"><</span><span style=3D"color: #606;=
" class=3D"styled-by-prettify">Foo</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">,</span><span style=3D"color: #000;" class=3D"style=
d-by-prettify"> </span><span style=3D"color: #606;" class=3D"styled-by-pret=
tify">Foo</span><span style=3D"color: #660;" class=3D"styled-by-prettify">:=
:</span><span style=3D"color: #000;" class=3D"styled-by-prettify">CENTRE</s=
pan><span style=3D"color: #660;" class=3D"styled-by-prettify">>()</span>=
<span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span sty=
le=3D"color: #660;" class=3D"styled-by-prettify">{</span><span style=3D"col=
or: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 </span><span styl=
e=3D"color: #800;" class=3D"styled-by-prettify">// do stuff</span><span sty=
le=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: #0=
00;" class=3D"styled-by-prettify"><br></span></div></code></div><br><code c=
lass=3D"prettyprint"><span style=3D"color: #000;" class=3D"styled-by-pretti=
fy">As you can see the type information is redundant here. My proposal woul=
d be to allow:<br><br><div class=3D"prettyprint" style=3D"background-color:=
rgb(250, 250, 250); border-color: rgb(187, 187, 187); border-style: solid;=
border-width: 1px; word-wrap: break-word;"><code class=3D"prettyprint"><di=
v class=3D"subprettyprint"><span style=3D"color: #008;" class=3D"styled-by-=
prettify">template</span><span style=3D"color: #000;" class=3D"styled-by-pr=
ettify"> </span><span style=3D"color: #660;" class=3D"styled-by-prettify">&=
lt;</span><span style=3D"color: #008;" class=3D"styled-by-prettify">auto</s=
pan><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span=
style=3D"color: #606;" class=3D"styled-by-prettify">EnumVal</span><span st=
yle=3D"color: #660;" class=3D"styled-by-prettify">,</span><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #008=
;" class=3D"styled-by-prettify">class</span><span style=3D"color: #000;" cl=
ass=3D"styled-by-prettify"> </span><span style=3D"color: #606;" class=3D"st=
yled-by-prettify">EnumT</span><span style=3D"color: #000;" class=3D"styled-=
by-prettify"> </span><span style=3D"color: #660;" class=3D"styled-by-pretti=
fy">=3D</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </=
span><span style=3D"color: #008;" class=3D"styled-by-prettify">decltype</sp=
an><span style=3D"color: #660;" class=3D"styled-by-prettify">(</span><span =
style=3D"color: #606;" class=3D"styled-by-prettify">EnumVal</span><span sty=
le=3D"color: #660;" class=3D"styled-by-prettify">)></span><span style=3D=
"color: #000;" class=3D"styled-by-prettify"><br>result_t</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify"><</span><span style=3D"co=
lor: #606;" class=3D"styled-by-prettify">EnumT</span><span style=3D"color: =
#660;" class=3D"styled-by-prettify">></span><span style=3D"color: #000;"=
class=3D"styled-by-prettify"> foo</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">();</span><span style=3D"color: #000;" class=3D"sty=
led-by-prettify"><br></span></div></code></div><br>The specialisation and f=
unction calls now only need a single argument:<br><br><div class=3D"prettyp=
rint" style=3D"background-color: rgb(250, 250, 250); border-color: rgb(187,=
187, 187); border-style: solid; border-width: 1px; word-wrap: break-word;"=
><code class=3D"prettyprint"><div class=3D"subprettyprint"><span style=3D"c=
olor: #008;" class=3D"styled-by-prettify">template</span><span style=3D"col=
or: #000;" class=3D"styled-by-prettify"> </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: #008;" class=
=3D"styled-by-prettify">double</span><span style=3D"color: #000;" class=3D"=
styled-by-prettify"> foo</span><span style=3D"color: #660;" class=3D"styled=
-by-prettify"><</span><span style=3D"color: #606;" class=3D"styled-by-pr=
ettify">Foo</span><span style=3D"color: #660;" class=3D"styled-by-prettify"=
>::</span><span style=3D"color: #000;" class=3D"styled-by-prettify">LEFT</s=
pan><span style=3D"color: #660;" class=3D"styled-by-prettify">>()</span>=
<span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span sty=
le=3D"color: #660;" class=3D"styled-by-prettify">{</span><span style=3D"col=
or: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 </span><span styl=
e=3D"color: #800;" class=3D"styled-by-prettify">// do stuff</span><span sty=
le=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: #0=
00;" class=3D"styled-by-prettify"><br></span></div></code></div><br>The ide=
a here is to remove the redundancy and simplify specialising and calling of=
the function template.<br><br></span></code></code></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" 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/6920af70-300e-4d2a-9400-4e2617d2c739%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/6920af70-300e-4d2a-9400-4e2617d2c739=
%40isocpp.org</a>.<br />
------=_Part_49_573067018.1458221332842--
------=_Part_48_1156644474.1458221332842--
.
Author: Kamikaze Dominic Fandrey <kamikaze@bsdforen.de>
Date: Thu, 17 Mar 2016 06:42:39 -0700 (PDT)
Raw View
------=_Part_78_60919461.1458222159231
Content-Type: multipart/alternative;
boundary="----=_Part_79_1368078493.1458222159231"
------=_Part_79_1368078493.1458222159231
Content-Type: text/plain; charset=UTF-8
On Thursday, 17 March 2016 14:28:53 UTC+1, Kamikaze Dominic Fandrey wrote:
>
> template <class EnumT>
> struct foo_result;
>
> template <class EnumT>
> using foo_result_t = typename foo_result::type;
>
> template <class EnumT, EnumT EnumVal>
> foo_result_t<EnumT> foo();
>
The alias is of course supposed to be:
template <class EnumT>
using foo_result_t = typename foo_result<EnumT>::type;
Why can I not fix this in the original post?
--
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/9e576af1-38dd-4931-9b89-0dffef59fef1%40isocpp.org.
------=_Part_79_1368078493.1458222159231
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><br><br>On Thursday, 17 March 2016 14:28:53 UTC+1, Kamikaz=
e Dominic Fandrey wrote:<blockquote class=3D"gmail_quote" style=3D"margin:=
0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div =
dir=3D"ltr"><code><div style=3D"background-color:rgb(250,250,250);border-co=
lor:rgb(187,187,187);border-style:solid;border-width:1px;word-wrap:break-wo=
rd"><code><div><span style=3D"color:#008">template</span><span style=3D"col=
or:#000"> </span><span style=3D"color:#660"><</span><span style=3D"color=
:#008">class</span><span style=3D"color:#000"> </span><span style=3D"color:=
#606">EnumT</span><span style=3D"color:#660">></span><span style=3D"colo=
r:#000"><br></span><span style=3D"color:#008">struct</span><span style=3D"c=
olor:#000"> foo_result</span><span style=3D"color:#660">;</span><span style=
=3D"color:#000"><br><br></span><span style=3D"color:#008">template</span><s=
pan style=3D"color:#000"> </span><span style=3D"color:#660"><</span><spa=
n style=3D"color:#008">class</span><span style=3D"color:#000"> </span><span=
style=3D"color:#606">EnumT</span><span style=3D"color:#660">></span><sp=
an style=3D"color:#000"><br></span><span style=3D"color:#008">using</span><=
span style=3D"color:#000"> foo_result_t </span><span style=3D"color:#660">=
=3D</span><span style=3D"color:#000"> </span><span style=3D"color:#008">typ=
ename</span><span style=3D"color:#000"> foo_result</span><span style=3D"col=
or:#660">::</span><span style=3D"color:#000">type</span><span style=3D"colo=
r:#660">;</span><span style=3D"color:#000"><br><br></span><span style=3D"co=
lor:#008">template</span><span style=3D"color:#000"> </span><span style=3D"=
color:#660"><</span><span style=3D"color:#008">class</span><span style=
=3D"color:#000"> </span><span style=3D"color:#606">EnumT</span><span style=
=3D"color:#660">,</span><span style=3D"color:#000"> </span><span style=3D"c=
olor:#606">EnumT</span><span style=3D"color:#000"> </span><span style=3D"co=
lor:#606">EnumVal</span><span style=3D"color:#660">></span><span style=
=3D"color:#000"><br>foo_result_t</span><span style=3D"color:#660"><</spa=
n><span style=3D"color:#606">EnumT</span><span style=3D"color:#660">></s=
pan><span style=3D"color:#000"> foo</span><span style=3D"color:#660">();</s=
pan><span style=3D"color:#000"><br></span></div></code></div></code></div><=
/blockquote><div><br>The alias is of course supposed to be:<br><br><code><c=
ode><span style=3D"color:#008">template</span><span style=3D"color:#000"> <=
/span><span style=3D"color:#660"><</span><span style=3D"color:#008">clas=
s</span><span style=3D"color:#000"> </span><span style=3D"color:#606">EnumT=
</span><span style=3D"color:#660">></span><span style=3D"color:#000"><br=
></span><span style=3D"color:#008">using</span><span style=3D"color:#000"> =
foo_result_t </span><span style=3D"color:#660">=3D</span><span style=3D"col=
or:#000"> </span><span style=3D"color:#008">typename</span><span style=3D"c=
olor:#000"> foo_result</span><span style=3D"color:#660"><EnumT>::</sp=
an><span style=3D"color:#000">type</span><span style=3D"color:#660">;</span=
><span style=3D"color:#000"><br><br>Why can I not fix this in the original =
post?<br></span></code></code></div></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" 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/9e576af1-38dd-4931-9b89-0dffef59fef1%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/9e576af1-38dd-4931-9b89-0dffef59fef1=
%40isocpp.org</a>.<br />
------=_Part_79_1368078493.1458222159231--
------=_Part_78_60919461.1458222159231--
.
Author: Matthew Woehlke <mwoehlke.floss@gmail.com>
Date: Thu, 17 Mar 2016 11:17:08 -0400
Raw View
On 2016-03-17 09:48, Ville Voutilainen wrote:
> On 17 March 2016 at 15:42, Kamikaze Dominic Fandrey wrote:
>> On Thursday, 17 March 2016 14:28:53 UTC+1, Kamikaze Dominic Fandrey wrote:
>>> template <class EnumT>
>>> struct foo_result;
>>>
>>> template <class EnumT>
>>> using foo_result_t = typename foo_result::type;
>>>
>>> template <class EnumT, EnumT EnumVal>
>>> foo_result_t<EnumT> foo();
>>
>>
>> The alias is of course supposed to be:
>>
>> template <class EnumT>
>> using foo_result_t = typename foo_result<EnumT>::type;
>>
>> Why can I not fix this in the original post?
Are you trying to edit an e-mail? You can't do that after it's sent...
> See
> http://open-std.org/JTC1/SC22/WG21/docs/papers/2015/p0127r0.html
Thanks; I knew that feature request looked familiar :-).
@Dominic, I believe this (P0127) is currently in "forwarded to Core"
status. I don't see any record that Core got to it in Jacksonville, so
it's probably on the docket for Oulu, so there is hope that it will be
in C++17.
--
Matthew
--
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/ncehpk%24673%241%40ger.gmane.org.
.
Author: Kamikaze Dominic Fandrey <kamikaze@bsdforen.de>
Date: Fri, 18 Mar 2016 06:26:41 -0700 (PDT)
Raw View
------=_Part_84_1059984108.1458307601514
Content-Type: multipart/alternative;
boundary="----=_Part_85_1223833473.1458307601515"
------=_Part_85_1223833473.1458307601515
Content-Type: text/plain; charset=UTF-8
On Thursday, 17 March 2016 16:17:33 UTC+1, Matthew Woehlke wrote:
>
> Are you trying to edit an e-mail? You can't do that after it's sent...
>
This is a mailing list? I followed the link on isocpp.org to this google
groups thing.
Which seems like a bulletin board with the weirdest user experience. I would
much rather communicate on a mailing list than continue using that.
--
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/be9f7beb-bcc9-44b7-b891-8b70ff870832%40isocpp.org.
------=_Part_85_1223833473.1458307601515
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><br>On Thursday, 17 March 2016 16:17:33 UTC+1, Matthew Woe=
hlke wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-lef=
t: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">Are you trying to =
edit an e-mail? You can't do that after it's sent...
<br></blockquote><div><br>This is a mailing list? I followed the link on is=
ocpp.org to this google groups thing.<br>Which seems like a bulletin board =
with the weirdest user experience. I would<br>much rather communicate on a =
mailing list than continue using that.<br></div></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" 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/be9f7beb-bcc9-44b7-b891-8b70ff870832%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/be9f7beb-bcc9-44b7-b891-8b70ff870832=
%40isocpp.org</a>.<br />
------=_Part_85_1223833473.1458307601515--
------=_Part_84_1059984108.1458307601514--
.
Author: Nicol Bolas <jmckesson@gmail.com>
Date: Fri, 18 Mar 2016 07:09:23 -0700 (PDT)
Raw View
------=_Part_146_617971050.1458310163575
Content-Type: multipart/alternative;
boundary="----=_Part_147_548881232.1458310163576"
------=_Part_147_548881232.1458310163576
Content-Type: text/plain; charset=UTF-8
On Friday, March 18, 2016 at 9:26:41 AM UTC-4, Kamikaze Dominic Fandrey
wrote:
>
>
> On Thursday, 17 March 2016 16:17:33 UTC+1, Matthew Woehlke wrote:
>>
>> Are you trying to edit an e-mail? You can't do that after it's sent...
>>
>
> This is a mailing list? I followed the link on isocpp.org to this google
> groups thing.
> Which seems like a bulletin board with the weirdest user experience. I
> would
> much rather communicate on a mailing list than continue using that.
>
It's a mailing list with a forum-like GUI for those who prefer not to
clutter their email accounts with random discussions (like myself).
If you want to use it as a mailing list, then just change your "Membership
and email settings" to send e-mails to your e-mail account. Then use your
e-mail reader of choice.
--
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/7ced8ca6-83df-4b77-89b8-2e26abbdd1e6%40isocpp.org.
------=_Part_147_548881232.1458310163576
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">On Friday, March 18, 2016 at 9:26:41 AM UTC-4, Kamikaze Do=
minic Fandrey wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;ma=
rgin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=
=3D"ltr"><br>On Thursday, 17 March 2016 16:17:33 UTC+1, Matthew Woehlke wr=
ote:<blockquote class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;b=
order-left:1px #ccc solid;padding-left:1ex">Are you trying to edit an e-mai=
l? You can't do that after it's sent...
<br></blockquote><div><br>This is a mailing list? I followed the link on <a=
href=3D"http://isocpp.org" target=3D"_blank" rel=3D"nofollow" onmousedown=
=3D"this.href=3D'http://www.google.com/url?q\75http%3A%2F%2Fisocpp.org\=
46sa\75D\46sntz\0751\46usg\75AFQjCNHaIcX84r8AUHgx9Q4pR00LZ1llsQ';return=
true;" onclick=3D"this.href=3D'http://www.google.com/url?q\75http%3A%2=
F%2Fisocpp.org\46sa\75D\46sntz\0751\46usg\75AFQjCNHaIcX84r8AUHgx9Q4pR00LZ1l=
lsQ';return true;">isocpp.org</a> to this google groups thing.<br>Which=
seems like a bulletin board with the weirdest user experience. I would<br>=
much rather communicate on a mailing list than continue using that.<br></di=
v></div></blockquote><div><br>It's a mailing list with a forum-like GUI=
for those who prefer not to clutter their email accounts with random discu=
ssions (like myself).<br><br>If you want to use it as a mailing list, then =
just change your "Membership and email settings" to send e-mails =
to your e-mail account. Then use your e-mail reader of choice.<br></div></d=
iv>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" 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/7ced8ca6-83df-4b77-89b8-2e26abbdd1e6%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/7ced8ca6-83df-4b77-89b8-2e26abbdd1e6=
%40isocpp.org</a>.<br />
------=_Part_147_548881232.1458310163576--
------=_Part_146_617971050.1458310163575--
.
Author: Matthew Woehlke <mwoehlke.floss@gmail.com>
Date: Fri, 18 Mar 2016 10:42:13 -0400
Raw View
On 2016-03-18 09:26, Kamikaze Dominic Fandrey wrote:
> On Thursday, 17 March 2016 16:17:33 UTC+1, Matthew Woehlke wrote:
>> Are you trying to edit an e-mail? You can't do that after it's sent...
>
> This is a mailing list? I followed the link on isocpp.org to this
> google groups thing. Which seems like a bulletin board with the
> weirdest user experience.
AFAIK, *all* Google Groups are mailing lists :-). "Google Groups" is
Google's name for their e-mail list services. I almost never use it, but
IIRC the Groups web interface is basically the GMail interface with
different sidebar navigation.
> I would much rather communicate on a mailing list than continue using
> that.
My preferred experience is to read and post via NNTP (all the benefits
of e-mail *plus* clean separation of content). For this group, you can
do that via news://news.gmane.org/gmane.comp.lang.c++.isocpp.proposals.
Or see Nicol's instructions to use e-mail.
--
Matthew
--
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/nch445%24rl%241%40ger.gmane.org.
.
Author: Nicol Bolas <jmckesson@gmail.com>
Date: Fri, 18 Mar 2016 07:55:23 -0700 (PDT)
Raw View
------=_Part_1819_1822248673.1458312924022
Content-Type: multipart/alternative;
boundary="----=_Part_1820_826324505.1458312924022"
------=_Part_1820_826324505.1458312924022
Content-Type: text/plain; charset=UTF-8
On Friday, March 18, 2016 at 10:09:23 AM UTC-4, Nicol Bolas wrote:
>
> On Friday, March 18, 2016 at 9:26:41 AM UTC-4, Kamikaze Dominic Fandrey
> wrote:
>>
>>
>> On Thursday, 17 March 2016 16:17:33 UTC+1, Matthew Woehlke wrote:
>>>
>>> Are you trying to edit an e-mail? You can't do that after it's sent...
>>>
>>
>> This is a mailing list? I followed the link on isocpp.org to this google
>> groups thing.
>> Which seems like a bulletin board with the weirdest user experience. I
>> would
>> much rather communicate on a mailing list than continue using that.
>>
>
> It's a mailing list with a forum-like GUI for those who prefer not to
> clutter their email accounts with random discussions (like myself).
>
> If you want to use it as a mailing list, then just change your "Membership
> and email settings" to send e-mails to your e-mail account. Then use your
> e-mail reader of choice.
>
Just make sure not to reply to a "digest" email. That gets confusing for
everyone very quickly.
--
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/33a64fc9-1468-4d01-aee9-78e4d4b4df65%40isocpp.org.
------=_Part_1820_826324505.1458312924022
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><br><br>On Friday, March 18, 2016 at 10:09:23 AM UTC-4, Ni=
col Bolas wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin=
-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"lt=
r">On Friday, March 18, 2016 at 9:26:41 AM UTC-4, Kamikaze Dominic Fandrey =
wrote:<blockquote class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex=
;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><br>On Thurs=
day, 17 March 2016 16:17:33 UTC+1, Matthew Woehlke wrote:<blockquote class=
=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc s=
olid;padding-left:1ex">Are you trying to edit an e-mail? You can't do t=
hat after it's sent...
<br></blockquote><div><br>This is a mailing list? I followed the link on <a=
href=3D"http://isocpp.org" rel=3D"nofollow" target=3D"_blank" onmousedown=
=3D"this.href=3D'http://www.google.com/url?q\75http%3A%2F%2Fisocpp.org\=
46sa\75D\46sntz\0751\46usg\75AFQjCNHaIcX84r8AUHgx9Q4pR00LZ1llsQ';return=
true;" onclick=3D"this.href=3D'http://www.google.com/url?q\75http%3A%2=
F%2Fisocpp.org\46sa\75D\46sntz\0751\46usg\75AFQjCNHaIcX84r8AUHgx9Q4pR00LZ1l=
lsQ';return true;">isocpp.org</a> to this google groups thing.<br>Which=
seems like a bulletin board with the weirdest user experience. I would<br>=
much rather communicate on a mailing list than continue using that.<br></di=
v></div></blockquote><div><br>It's a mailing list with a forum-like GUI=
for those who prefer not to clutter their email accounts with random discu=
ssions (like myself).<br><br>If you want to use it as a mailing list, then =
just change your "Membership and email settings" to send e-mails =
to your e-mail account. Then use your e-mail reader of choice.<br></div></d=
iv></blockquote><div><br>Just make sure not to reply to a "digest"=
; email. That gets confusing for everyone very quickly. <br></div></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" 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/33a64fc9-1468-4d01-aee9-78e4d4b4df65%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/33a64fc9-1468-4d01-aee9-78e4d4b4df65=
%40isocpp.org</a>.<br />
------=_Part_1820_826324505.1458312924022--
------=_Part_1819_1822248673.1458312924022--
.