Topic: statement expansion


Author: sshimnick@hotmail.com
Date: Sun, 22 Jun 2014 06:06:16 -0700 (PDT)
Raw View
------=_Part_1224_21466753.1403442376885
Content-Type: text/plain; charset=UTF-8



It would be nice to have the following code legal in C++.


template <class T> void ImpFunc();


template <class ... TT>

void Func(int sw)

 {

  switch( sw )

    {

     *{* case TT::Val : ImpFunc<typename TT::Type>(); break; *}...*

    }

 }

The red line should be template parameter pack expanded. In other words, we
need the statement pack expansion. The statement pattern is enclosed in
square brackets and terminated with ellipse.



--

---
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/.

------=_Part_1224_21466753.1403442376885
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><p>It would be nice to have the following code legal in C+=
+.<br></p><p><font face=3D"courier new,monospace"><font size=3D"4"><font co=
lor=3D"#0000ff"><br></font></font></font></p><p><font face=3D"courier new,m=
onospace"><font size=3D"4"><font color=3D"#0000ff">template &lt;class T&gt;=
 void ImpFunc();<br></font></font></font></p><p><font face=3D"courier new,m=
onospace"><font size=3D"4"><font color=3D"#0000ff"><br></font></font></font=
></p><p><font face=3D"courier new,monospace"><font size=3D"4"><font color=
=3D"#0000ff">template &lt;class ... TT&gt;</font></font></font></p><p><font=
 face=3D"courier new,monospace"><font size=3D"4"><font color=3D"#0000ff">vo=
id Func(int sw)</font></font></font></p><p><font face=3D"courier new,monosp=
ace"><font size=3D"4"><font color=3D"#0000ff">&nbsp;{</font></font></font><=
/p><p><font face=3D"courier new,monospace"><font size=3D"4"><font color=3D"=
#0000ff">&nbsp; switch( sw )</font></font></font></p><p><font face=3D"couri=
er new,monospace"><font size=3D"4"><font color=3D"#0000ff">&nbsp; &nbsp; {<=
/font></font></font></p><p><font face=3D"courier new,monospace"><font size=
=3D"4"><font color=3D"#0000ff">&nbsp; &nbsp; &nbsp;</font></font></font><fo=
nt face=3D"courier new,monospace"><font size=3D"4"><strong><font color=3D"#=
ff0000">{</font></strong></font></font><font face=3D"courier new,monospace"=
><font size=3D"4"><font color=3D"#ff0000"> case TT::Val : ImpFunc&lt;typena=
me TT::Type&gt;(); break; </font></font></font><font face=3D"courier new,mo=
nospace"><font size=3D"4"><strong><font color=3D"#ff0000">}...</font></stro=
ng></font></font><font face=3D"courier new,monospace"><font size=3D"4"><fon=
t color=3D"#0000ff"><br></font></font></font></p><p><font face=3D"courier n=
ew,monospace"><font size=3D"4"><font color=3D"#0000ff">&nbsp; &nbsp; }</fon=
t></font></font></p><p><font face=3D"courier new,monospace"><font size=3D"4=
"><font color=3D"#0000ff">&nbsp;}</font></font></font></p><p>The red line s=
hould be template parameter pack expanded. In other words, we need the stat=
ement pack expansion. The statement pattern is enclosed in square brackets =
and terminated with ellipse.</p><p><br></p><p><br></p></div>

<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 />

------=_Part_1224_21466753.1403442376885--

.


Author: David Krauss <potswa@gmail.com>
Date: Sun, 29 Jun 2014 07:30:22 +0800
Raw View
--Apple-Mail=_F7AEA9D6-F9E9-4CF3-B089-07851C4B3BB9
Content-Type: text/plain; charset=ISO-8859-1


On 2014-06-22, at 9:06 PM, sshimnick@hotmail.com wrote:

> The red line should be template parameter pack expanded. In other words, we need the statement pack expansion. The statement pattern is enclosed in square brackets and terminated with ellipse.
>


You proposed this just days ago. The next step would be to write a draft following the general format of the papers found at http://open-std.org/jtc1/sc22/wg21/docs/papers/2014/ .

--

---
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/.

--Apple-Mail=_F7AEA9D6-F9E9-4CF3-B089-07851C4B3BB9
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;06&ndash;22, at 9:06 PM, <a href=3D"mailto:sshimnick@hotmail.com">ssh=
imnick@hotmail.com</a> wrote:</div><br class=3D"Apple-interchange-newline">=
<blockquote type=3D"cite"><div dir=3D"ltr"><p>The red line should be templa=
te parameter pack expanded. In other words, we need the statement pack expa=
nsion. The statement pattern is enclosed in square brackets and terminated =
with ellipse.</p></div></blockquote></div><div><br></div><div>You proposed =
this just days ago. The next step would be to write a draft following the g=
eneral format of the papers found at <a href=3D"http://open-std.org/jtc1/sc=
22/wg21/docs/papers/2014/">http://open-std.org/jtc1/sc22/wg21/docs/papers/2=
014/</a> .</div><br></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=_F7AEA9D6-F9E9-4CF3-B089-07851C4B3BB9--

.