Topic: Progress for universal template parameters


Author: Columbo <r.hl@gmx.net>
Date: Sat, 5 Sep 2015 07:16:33 -0700 (PDT)
Raw View
------=_Part_88_1407851593.1441462593274
Content-Type: multipart/alternative;
 boundary="----=_Part_89_275037442.1441462593274"

------=_Part_89_275037442.1441462593274
Content-Type: text/plain; charset=UTF-8

I believe that I've seen such a proposal already, but as I cannot find
anything related at the moment:
Is any progress being made in introducing template parameters that can
accept arguments of any kind?
Or was it deemed unnecessary/impractical to introduce it?

--

---
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_89_275037442.1441462593274
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">I believe that I&#39;ve seen such a proposal already, but =
as I cannot find anything related at the moment:<div>Is any progress being =
made in introducing template parameters that can accept arguments of any ki=
nd?</div><div>Or was it deemed unnecessary/impractical to introduce it?</di=
v><div><br></div></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_89_275037442.1441462593274--
------=_Part_88_1407851593.1441462593274--

.


Author: Arthur Tchaikovsky <atch.cpp@gmail.com>
Date: Sat, 5 Sep 2015 15:28:04 +0100
Raw View
--047d7bf10b200177f2051f00d384
Content-Type: text/plain; charset=UTF-8

Variadic templates come to mind but surely it is not what you're after?

On Sat, Sep 5, 2015 at 3:16 PM, Columbo <r.hl@gmx.net> wrote:

> I believe that I've seen such a proposal already, but as I cannot find
> anything related at the moment:
> Is any progress being made in introducing template parameters that can
> accept arguments of any kind?
> Or was it deemed unnecessary/impractical to introduce it?
>
> --
>
> ---
> 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/.
>



--
Yours sincerely
Artur Czajkowski

--

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

--047d7bf10b200177f2051f00d384
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Variadic templates come to mind but surely it is not what =
you&#39;re after?<br></div><div class=3D"gmail_extra"><br><div class=3D"gma=
il_quote">On Sat, Sep 5, 2015 at 3:16 PM, Columbo <span dir=3D"ltr">&lt;<a =
href=3D"mailto:r.hl@gmx.net" target=3D"_blank">r.hl@gmx.net</a>&gt;</span> =
wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;bord=
er-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr">I believe that I&=
#39;ve seen such a proposal already, but as I cannot find anything related =
at the moment:<div>Is any progress being made in introducing template param=
eters that can accept arguments of any kind?</div><div>Or was it deemed unn=
ecessary/impractical to introduce it?</div><span class=3D"HOEnZb"><font col=
or=3D"#888888"><div><br></div></font></span></div><span class=3D"HOEnZb"><f=
ont color=3D"#888888">

<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" target=3D"_=
blank">std-proposals+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">std-proposals@isocpp.org</a>.<br>
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/" target=3D"_blank">http://groups.google.com/a/isocpp.org/gro=
up/std-proposals/</a>.<br>
</font></span></blockquote></div><br><br clear=3D"all"><br>-- <br><div clas=
s=3D"gmail_signature">Yours sincerely<br>Artur Czajkowski</div>
</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 />

--047d7bf10b200177f2051f00d384--

.


Author: Nicol Bolas <jmckesson@gmail.com>
Date: Sat, 5 Sep 2015 09:53:10 -0700 (PDT)
Raw View
------=_Part_1969_1517905033.1441471990288
Content-Type: multipart/alternative;
 boundary="----=_Part_1970_2051564681.1441471990288"

------=_Part_1970_2051564681.1441471990288
Content-Type: text/plain; charset=UTF-8

Are you talking about template parameters which could be values, types, or
templates? That seems syntactically... difficult to reconcile; it sounds
only one step removed from full-frontal macros.

--

---
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_1970_2051564681.1441471990288
Content-Type: text/html; charset=UTF-8

<div dir="ltr">Are you talking about template parameters which could be values, types, or templates? That seems syntactically... difficult to reconcile; it sounds only one step removed from full-frontal macros.<br></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 email to <a href="mailto:std-proposals+unsubscribe@isocpp.org">std-proposals+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href="mailto:std-proposals@isocpp.org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href="http://groups.google.com/a/isocpp.org/group/std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/</a>.<br />

------=_Part_1970_2051564681.1441471990288--
------=_Part_1969_1517905033.1441471990288--

.


Author: Columbo <r.hl@gmx.net>
Date: Sat, 5 Sep 2015 11:00:43 -0700 (PDT)
Raw View
------=_Part_234_143931650.1441476043872
Content-Type: multipart/alternative;
 boundary="----=_Part_235_27324326.1441476043872"

------=_Part_235_27324326.1441476043872
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Am Samstag, 5. September 2015 18:53:10 UTC+2 schrieb Nicol Bolas:
>
> Are you talking about template parameters which could be values, types, o=
r=20
> templates? That seems syntactically... difficult to reconcile; it sounds=
=20
> only one step removed from full-frontal macros.
>
I thought about introducing the following notation
template <template class> struct A {};
=E2=80=A6such that A accepts *any* template. Now, ignoring current restrict=
ions=20
imposed on function concepts,=20
template <typename      > concept bool arbitrary() {return true;}
template <int           > concept bool arbitrary() {return true;}
template <template class> concept bool arbitrary() {return true;}
And use as e.g.
template <arbitrary... args> using forward_to_mine =3D my_template<args...>=
;

That's not particularly elegant though.

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

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

<div dir=3D"ltr">Am Samstag, 5. September 2015 18:53:10 UTC+2 schrieb Nicol=
 Bolas:<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">Are yo=
u talking about template parameters which could be values, types, or templa=
tes? That seems syntactically... difficult to reconcile; it sounds only one=
 step removed from full-frontal macros.<br></div></blockquote><div>I though=
t about introducing the following notation</div><div><div class=3D"prettypr=
int" style=3D"border: 1px solid rgb(187, 187, 187); word-wrap: break-word; =
background-color: rgb(250, 250, 250);"><code class=3D"prettyprint"><div cla=
ss=3D"subprettyprint"><span style=3D"color: #008;" class=3D"styled-by-prett=
ify">template</span><span style=3D"color: #000;" class=3D"styled-by-prettif=
y"> </span><span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</=
span><span style=3D"color: #008;" class=3D"styled-by-prettify">template</sp=
an><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span =
style=3D"color: #008;" class=3D"styled-by-prettify">class</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">&gt;</span><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #008=
;" class=3D"styled-by-prettify">struct</span><span style=3D"color: #000;" c=
lass=3D"styled-by-prettify"> A </span><span style=3D"color: #660;" class=3D=
"styled-by-prettify">{};</span></div></code></div></div><div><font face=3D"=
arial, sans-serif">=E2=80=A6</font><font face=3D"arial, sans-serif">such th=
at</font><font face=3D"courier new, monospace"> A=C2=A0</font>accepts <i>an=
y</i> template. Now, ignoring current restrictions imposed on function conc=
epts,=C2=A0</div><div class=3D"prettyprint" style=3D"border: 1px solid rgb(=
187, 187, 187); word-wrap: break-word; background-color: rgb(250, 250, 250)=
;"><code class=3D"prettyprint"><div class=3D"subprettyprint"><span style=3D=
"color: #008;" class=3D"styled-by-prettify">template</span><span style=3D"c=
olor: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #66=
0;" class=3D"styled-by-prettify">&lt;</span><span style=3D"color: #008;" cl=
ass=3D"styled-by-prettify">typename</span><span style=3D"color: #000;" clas=
s=3D"styled-by-prettify"> =C2=A0 =C2=A0 =C2=A0</span><span style=3D"color: =
#660;" class=3D"styled-by-prettify">&gt;</span><span style=3D"color: #000;"=
 class=3D"styled-by-prettify"> </span><span style=3D"color: #008;" class=3D=
"styled-by-prettify">concept</span><span style=3D"color: #000;" class=3D"st=
yled-by-prettify"> </span><span style=3D"color: #008;" class=3D"styled-by-p=
rettify">bool</span><span style=3D"color: #000;" class=3D"styled-by-prettif=
y"> arbitrary</span><span style=3D"color: #660;" class=3D"styled-by-prettif=
y">()</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: #008;" class=3D"styled-by-prettify">return</span><span styl=
e=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"colo=
r: #008;" class=3D"styled-by-prettify">true</span><span style=3D"color: #66=
0;" class=3D"styled-by-prettify">;}</span><span style=3D"color: #000;" clas=
s=3D"styled-by-prettify"><br></span><span style=3D"color: #008;" class=3D"s=
tyled-by-prettify">template</span><span style=3D"color: #000;" class=3D"sty=
led-by-prettify"> </span><span style=3D"color: #660;" class=3D"styled-by-pr=
ettify">&lt;</span><span style=3D"color: #008;" class=3D"styled-by-prettify=
">int</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">&gt;</span><span style=3D"color: #000;" class=3D"st=
yled-by-prettify"> </span><span style=3D"color: #008;" class=3D"styled-by-p=
rettify">concept</span><span style=3D"color: #000;" class=3D"styled-by-pret=
tify"> </span><span style=3D"color: #008;" class=3D"styled-by-prettify">boo=
l</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> arbitrar=
y</span><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: #008;" class=3D"styled-by-prettify">return</span><span style=3D"color: =
#000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #008;" cl=
ass=3D"styled-by-prettify">true</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-pre=
ttify">template</span><span style=3D"color: #000;" class=3D"styled-by-prett=
ify"> </span><span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;=
</span><span style=3D"color: #008;" class=3D"styled-by-prettify">template</=
span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><spa=
n style=3D"color: #008;" class=3D"styled-by-prettify">class</span><span sty=
le=3D"color: #660;" class=3D"styled-by-prettify">&gt;</span><span style=3D"=
color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #0=
08;" class=3D"styled-by-prettify">concept</span><span style=3D"color: #000;=
" class=3D"styled-by-prettify"> </span><span style=3D"color: #008;" class=
=3D"styled-by-prettify">bool</span><span style=3D"color: #000;" class=3D"st=
yled-by-prettify"> arbitrary</span><span style=3D"color: #660;" class=3D"st=
yled-by-prettify">()</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: #008;" class=3D"styled-by-prettify">return</=
span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><spa=
n style=3D"color: #008;" class=3D"styled-by-prettify">true</span><span styl=
e=3D"color: #660;" class=3D"styled-by-prettify">;}</span></div></code></div=
><div>And use as e.g.</div><div><div class=3D"prettyprint" style=3D"border:=
 1px solid rgb(187, 187, 187); word-wrap: break-word; background-color: rgb=
(250, 250, 250);"><code class=3D"prettyprint"><div class=3D"subprettyprint"=
><span style=3D"color: #008;" class=3D"styled-by-prettify">template</span><=
span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span styl=
e=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span style=3D"c=
olor: #000;" class=3D"styled-by-prettify">arbitrary</span><span style=3D"co=
lor: #660;" class=3D"styled-by-prettify">...</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify"> args</span><span style=3D"color: #660;" =
class=3D"styled-by-prettify">&gt;</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> </span><span style=3D"color: #008;" class=3D"style=
d-by-prettify">using</span><span style=3D"color: #000;" class=3D"styled-by-=
prettify"> forward_to_mine </span><span style=3D"color: #660;" class=3D"sty=
led-by-prettify">=3D</span><span style=3D"color: #000;" class=3D"styled-by-=
prettify"> my_template</span><span style=3D"color: #660;" class=3D"styled-b=
y-prettify">&lt;</span><span style=3D"color: #000;" class=3D"styled-by-pret=
tify">args</span><span style=3D"color: #660;" class=3D"styled-by-prettify">=
....&gt;;</span></div></code></div><br></div><div>That&#39;s not particularl=
y elegant though.</div></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_235_27324326.1441476043872--
------=_Part_234_143931650.1441476043872--

.


Author: Nicol Bolas <jmckesson@gmail.com>
Date: Sat, 5 Sep 2015 11:36:16 -0700 (PDT)
Raw View
------=_Part_1997_1629282276.1441478176711
Content-Type: multipart/alternative;
 boundary="----=_Part_1998_1908384913.1441478176711"

------=_Part_1998_1908384913.1441478176711
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable



On Saturday, September 5, 2015 at 2:00:44 PM UTC-4, Columbo wrote:
>
> Am Samstag, 5. September 2015 18:53:10 UTC+2 schrieb Nicol Bolas:
>>
>> Are you talking about template parameters which could be values, types,=
=20
>> or templates? That seems syntactically... difficult to reconcile; it sou=
nds=20
>> only one step removed from full-frontal macros.
>>
> I thought about introducing the following notation
> template <template class> struct A {};
> =E2=80=A6such that A accepts *any* template.
>

OK, so... what does `A` do with "any template"? If the template argument to=
=20
`A` can be a template, class, or value, what exactly is `A` going to do=20
with it?

You can't have A do something like this:

template<stuff argName> struct A { argName a; };

Because the user could pass a value or a template And if they did, the=20
above would be syntactic nonsense.

Similarly, you can't do this:

template<stuff argName> struct A { argName<foo> a; };

If `argName` were a class or value, this is likewise syntactic nonsense.=20
And so forth.

I do not know of a use of `argName` which would be equally valid C++ for=20
values, templates, and concrete classes. Can you provide an example? One=20
that actually does something with the template argument?

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

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

<br><br>On Saturday, September 5, 2015 at 2:00:44 PM UTC-4, Columbo wrote:<=
blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;bord=
er-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr">Am Samstag, 5.=
 September 2015 18:53:10 UTC+2 schrieb Nicol Bolas:<blockquote class=3D"gma=
il_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;pa=
dding-left:1ex"><div dir=3D"ltr">Are you talking about template parameters =
which could be values, types, or templates? That seems syntactically... dif=
ficult to reconcile; it sounds only one step removed from full-frontal macr=
os.<br></div></blockquote><div>I thought about introducing the following no=
tation</div><div><div style=3D"border:1px solid rgb(187,187,187);word-wrap:=
break-word;background-color:rgb(250,250,250)"><code><div><span style=3D"col=
or:#008">template</span><span style=3D"color:#000"> </span><span style=3D"c=
olor:#660">&lt;</span><span style=3D"color:#008">template</span><span style=
=3D"color:#000"> </span><span style=3D"color:#008">class</span><span style=
=3D"color:#660">&gt;</span><span style=3D"color:#000"> </span><span style=
=3D"color:#008">struct</span><span style=3D"color:#000"> A </span><span sty=
le=3D"color:#660">{};</span></div></code></div></div><div><font face=3D"ari=
al, sans-serif">=E2=80=A6</font><font face=3D"arial, sans-serif">such that<=
/font><font face=3D"courier new, monospace"> A=C2=A0</font>accepts <i>any</=
i> template.</div></div></blockquote><div><br>OK, so... what does `A` do wi=
th &quot;any template&quot;? If the template argument to `A` can be a templ=
ate, class, or value, what exactly is `A` going to do with it?<br><br>You c=
an&#39;t have A do something like this:<br><br><div class=3D"prettyprint" s=
tyle=3D"background-color: rgb(250, 250, 250); border-color: rgb(187, 187, 1=
87); border-style: solid; border-width: 1px; word-wrap: break-word;"><code =
class=3D"prettyprint"><div class=3D"subprettyprint"><span style=3D"color: #=
008;" class=3D"styled-by-prettify">template</span><span style=3D"color: #66=
0;" class=3D"styled-by-prettify">&lt;</span><span style=3D"color: #000;" cl=
ass=3D"styled-by-prettify">stuff argName</span><span style=3D"color: #660;"=
 class=3D"styled-by-prettify">&gt;</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> </span><span style=3D"color: #008;" class=3D"style=
d-by-prettify">struct</span><span style=3D"color: #000;" class=3D"styled-by=
-prettify"> A </span><span style=3D"color: #660;" class=3D"styled-by-pretti=
fy">{</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> argN=
ame a</span><span style=3D"color: #660;" class=3D"styled-by-prettify">;</sp=
an><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span =
style=3D"color: #660;" class=3D"styled-by-prettify">};</span></div></code><=
/div><br>Because the user could pass a value or a template And if they did,=
 the above would be syntactic nonsense.<br><br>Similarly, you can&#39;t do =
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-w=
idth: 1px; word-wrap: break-word;"><code class=3D"prettyprint"><div class=
=3D"subprettyprint"><span style=3D"color: #008;" class=3D"styled-by-prettif=
y">template</span><span style=3D"color: #660;" class=3D"styled-by-prettify"=
>&lt;</span><span style=3D"color: #000;" class=3D"styled-by-prettify">stuff=
 argName</span><span style=3D"color: #660;" class=3D"styled-by-prettify">&g=
t;</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span>=
<span style=3D"color: #008;" class=3D"styled-by-prettify">struct</span><spa=
n style=3D"color: #000;" class=3D"styled-by-prettify"> A </span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">{</span><span style=3D"color=
: #000;" class=3D"styled-by-prettify"> argName</span><span style=3D"color: =
#080;" class=3D"styled-by-prettify">&lt;foo&gt;</span><span style=3D"color:=
 #000;" class=3D"styled-by-prettify"> a</span><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: #660;" class=3D"styled-by=
-prettify">};</span></div></code></div><br>If `argName` were a class or val=
ue, this is likewise syntactic nonsense. And so forth.<br><br>I do not know=
 of a use of `argName` which would be equally valid C++ for values, templat=
es, and concrete classes. Can you provide an example? One that actually doe=
s something with the template argument?<br></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_1998_1908384913.1441478176711--
------=_Part_1997_1629282276.1441478176711--

.


Author: Columbo <r.hl@gmx.net>
Date: Sat, 5 Sep 2015 11:41:13 -0700 (PDT)
Raw View
------=_Part_340_1632920666.1441478473986
Content-Type: multipart/alternative;
 boundary="----=_Part_341_1216510602.1441478473987"

------=_Part_341_1216510602.1441478473987
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

A is not accepting everything. A is solely accepting class or alias=20
templates; However, it does not require any specific signature. It's just a=
=20
feature that helps to implement arbitrary.

Am Samstag, 5. September 2015 20:36:17 UTC+2 schrieb Nicol Bolas:
>
>
>
> On Saturday, September 5, 2015 at 2:00:44 PM UTC-4, Columbo wrote:
>>
>> Am Samstag, 5. September 2015 18:53:10 UTC+2 schrieb Nicol Bolas:
>>>
>>> Are you talking about template parameters which could be values, types,=
=20
>>> or templates? That seems syntactically... difficult to reconcile; it so=
unds=20
>>> only one step removed from full-frontal macros.
>>>
>> I thought about introducing the following notation
>> template <template class> struct A {};
>> =E2=80=A6such that A accepts *any* template.
>>
>
> OK, so... what does `A` do with "any template"? If the template argument=
=20
> to `A` can be a template, class, or value, what exactly is `A` going to d=
o=20
> with it?
>
> You can't have A do something like this:
>
> template<stuff argName> struct A { argName a; };
>
> Because the user could pass a value or a template And if they did, the=20
> above would be syntactic nonsense.
>
> Similarly, you can't do this:
>
> template<stuff argName> struct A { argName<foo> a; };
>
> If `argName` were a class or value, this is likewise syntactic nonsense.=
=20
> And so forth.
>
> I do not know of a use of `argName` which would be equally valid C++ for=
=20
> values, templates, and concrete classes. Can you provide an example? One=
=20
> that actually does something with the template argument?
>

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

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

<div dir=3D"ltr"><font face=3D"courier new, monospace">A</font> is not acce=
pting everything. <font face=3D"courier new, monospace">A</font> is solely =
accepting class or alias templates; However, it does not require any specif=
ic signature. It&#39;s just a feature that helps to implement <font face=3D=
"courier new, monospace">arbitrary</font>.<br><br>Am Samstag, 5. September =
2015 20:36:17 UTC+2 schrieb Nicol Bolas:<blockquote class=3D"gmail_quote" s=
tyle=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-le=
ft: 1ex;"><br><br>On Saturday, September 5, 2015 at 2:00:44 PM UTC-4, Colum=
bo 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">Am Samsta=
g, 5. September 2015 18:53:10 UTC+2 schrieb Nicol Bolas:<blockquote class=
=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc s=
olid;padding-left:1ex"><div dir=3D"ltr">Are you talking about template para=
meters which could be values, types, or templates? That seems syntactically=
.... difficult to reconcile; it sounds only one step removed from full-front=
al macros.<br></div></blockquote><div>I thought about introducing the follo=
wing notation</div><div><div style=3D"border:1px solid rgb(187,187,187);wor=
d-wrap:break-word;background-color:rgb(250,250,250)"><code><div><span style=
=3D"color:#008">template</span><span style=3D"color:#000"> </span><span sty=
le=3D"color:#660">&lt;</span><span style=3D"color:#008">template</span><spa=
n style=3D"color:#000"> </span><span style=3D"color:#008">class</span><span=
 style=3D"color:#660">&gt;</span><span style=3D"color:#000"> </span><span s=
tyle=3D"color:#008">struct</span><span style=3D"color:#000"> A </span><span=
 style=3D"color:#660">{};</span></div></code></div></div><div><font face=3D=
"arial, sans-serif">=E2=80=A6</font><font face=3D"arial, sans-serif">such t=
hat</font><font face=3D"courier new, monospace"> A=C2=A0</font>accepts <i>a=
ny</i> template.</div></div></blockquote><div><br>OK, so... what does `A` d=
o with &quot;any template&quot;? If the template argument to `A` can be a t=
emplate, class, or value, what exactly is `A` going to do with it?<br><br>Y=
ou can&#39;t have A do something like this:<br><br><div style=3D"background=
-color:rgb(250,250,250);border-color:rgb(187,187,187);border-style:solid;bo=
rder-width:1px;word-wrap:break-word"><code><div><span style=3D"color:#008">=
template</span><span style=3D"color:#660">&lt;</span><span style=3D"color:#=
000">stuff argName</span><span style=3D"color:#660">&gt;</span><span style=
=3D"color:#000"> </span><span style=3D"color:#008">struct</span><span style=
=3D"color:#000"> A </span><span style=3D"color:#660">{</span><span style=3D=
"color:#000"> argName a</span><span style=3D"color:#660">;</span><span styl=
e=3D"color:#000"> </span><span style=3D"color:#660">};</span></div></code><=
/div><br>Because the user could pass a value or a template And if they did,=
 the above would be syntactic nonsense.<br><br>Similarly, you can&#39;t do =
this:<br><br><div style=3D"background-color:rgb(250,250,250);border-color:r=
gb(187,187,187);border-style:solid;border-width:1px;word-wrap:break-word"><=
code><div><span style=3D"color:#008">template</span><span style=3D"color:#6=
60">&lt;</span><span style=3D"color:#000">stuff argName</span><span style=
=3D"color:#660">&gt;</span><span style=3D"color:#000"> </span><span style=
=3D"color:#008">struct</span><span style=3D"color:#000"> A </span><span sty=
le=3D"color:#660">{</span><span style=3D"color:#000"> argName</span><span s=
tyle=3D"color:#080">&lt;foo&gt;</span><span style=3D"color:#000"> a</span><=
span style=3D"color:#660">;</span><span style=3D"color:#000"> </span><span =
style=3D"color:#660">};</span></div></code></div><br>If `argName` were a cl=
ass or value, this is likewise syntactic nonsense. And so forth.<br><br>I d=
o not know of a use of `argName` which would be equally valid C++ for value=
s, templates, and concrete classes. Can you provide an example? One that ac=
tually does something with the template argument?<br></div></blockquote></d=
iv>

<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_341_1216510602.1441478473987--
------=_Part_340_1632920666.1441478473986--

.


Author: Nicol Bolas <jmckesson@gmail.com>
Date: Sat, 5 Sep 2015 11:52:55 -0700 (PDT)
Raw View
------=_Part_2046_1229170000.1441479175803
Content-Type: multipart/alternative;
 boundary="----=_Part_2047_1953981408.1441479175803"

------=_Part_2047_1953981408.1441479175803
Content-Type: text/plain; charset=UTF-8

On Saturday, September 5, 2015 at 2:41:14 PM UTC-4, Columbo wrote:
>
> A is not accepting everything. A is solely accepting class or alias
> templates;
>

So A accepts a type template, which could have any number of parameters of
any kind. It's not clear what you can actually do with such a type template
of unknown nature. Your `arbitrary` doesn't actually do anything with it.

--

---
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_2047_1953981408.1441479175803
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Saturday, September 5, 2015 at 2:41:14 PM UTC-4, Columb=
o 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"><font=
 face=3D"courier new, monospace">A</font> is not accepting everything. <fon=
t face=3D"courier new, monospace">A</font> is solely accepting class or ali=
as templates;</div></blockquote><div><br>So A accepts a type template, whic=
h could have any number of parameters of any kind. It&#39;s not clear what =
you can actually do with such a type template of unknown nature. Your `arbi=
trary` doesn&#39;t actually do anything with it.<br></div></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_2047_1953981408.1441479175803--
------=_Part_2046_1229170000.1441479175803--

.


Author: Columbo <r.hl@gmx.net>
Date: Sat, 5 Sep 2015 11:59:02 -0700 (PDT)
Raw View
------=_Part_2136_919881676.1441479542944
Content-Type: multipart/alternative;
 boundary="----=_Part_2137_2044755170.1441479542945"

------=_Part_2137_2044755170.1441479542945
Content-Type: text/plain; charset=UTF-8

Am Samstag, 5. September 2015 20:52:56 UTC+2 schrieb Nicol Bolas:
>
> On Saturday, September 5, 2015 at 2:41:14 PM UTC-4, Columbo wrote:
>>
>> A is not accepting everything. A is solely accepting class or alias
>> templates;
>>
>
> So A accepts a type template, which could have any number of parameters of
> any kind. It's not clear what you can actually do with such a type template
> of unknown nature.
>
Forward it, or instantiate it with arguments from which you know that they
are valid for this 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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

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

<div dir=3D"ltr">Am Samstag, 5. September 2015 20:52:56 UTC+2 schrieb Nicol=
 Bolas:<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">On Sat=
urday, September 5, 2015 at 2:41:14 PM UTC-4, Columbo wrote:<blockquote cla=
ss=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc=
 solid;padding-left:1ex"><div dir=3D"ltr"><font face=3D"courier new, monosp=
ace">A</font> is not accepting everything. <font face=3D"courier new, monos=
pace">A</font> is solely accepting class or alias templates;</div></blockqu=
ote><div><br>So A accepts a type template, which could have any number of p=
arameters of any kind. It&#39;s not clear what you can actually do with suc=
h a type template of unknown nature.</div></div></blockquote><div>Forward i=
t, or instantiate it with arguments from which you know that they are valid=
 for this template.=C2=A0</div></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_2137_2044755170.1441479542945--
------=_Part_2136_919881676.1441479542944--

.


Author: Thiago Macieira <thiago@macieira.org>
Date: Sat, 05 Sep 2015 14:14:33 -0700
Raw View
On Saturday 05 September 2015 11:59:02 Columbo wrote:
> Am Samstag, 5. September 2015 20:52:56 UTC+2 schrieb Nicol Bolas:
> > On Saturday, September 5, 2015 at 2:41:14 PM UTC-4, Columbo wrote:
> >> A is not accepting everything. A is solely accepting class or alias
> >> templates;
> >
> > So A accepts a type template, which could have any number of parameters of
> > any kind. It's not clear what you can actually do with such a type
> > template
> > of unknown nature.
>
> Forward it, or instantiate it with arguments from which you know that they
> are valid for this template.

Sounds like you want a rebind structure instead.

struct myrebind
{
 template <typename Foo, int I, template <typename> class TTP>
 using rebind = myrealtype<Foo, I, TTP>;
};

template <typename rebind> struct A
{
 using type = typename rebind::rebind<A, 1, SomeCollection>;
};

--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

--

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

.