Topic: Template Argument Deduction for call to a base class constructor
Author: mihailnajdenov@gmail.com
Date: Wed, 14 Nov 2018 12:32:42 -0800 (PST)
Raw View
------=_Part_193_1890243296.1542227562251
Content-Type: multipart/alternative;
boundary="----=_Part_194_247042594.1542227562251"
------=_Part_194_247042594.1542227562251
Content-Type: text/plain; charset="UTF-8"
Consider
template<class T>
struct A
{
A(T) {}
};
template<class T>
struct B : A<T>
{
B(T t, int i)
: A(t) //< nope
{}
};
int main()
{
A c(12); //< yep
}
This case is not considered in p1021
<http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2018/p1021r1.html>. Any
reason what this might be? An omission, a technical issue?
Because sooner or later people will wonder why it works in one context and
not in other.
--
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/16f99f8f-6596-4450-98f8-1bd7332cb21c%40isocpp.org.
------=_Part_194_247042594.1542227562251
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">Consider<div><br></div><div><div><br></div><div><font face=
=3D"courier new, monospace">template<class T></font></div><div><font =
face=3D"courier new, monospace">struct A=C2=A0</font></div><div><font face=
=3D"courier new, monospace">{</font></div><div><font face=3D"courier new, m=
onospace">=C2=A0 =C2=A0 A(T) {}</font></div><div><font face=3D"courier new,=
monospace">};</font></div><div><font face=3D"courier new, monospace"><br><=
/font></div><div><font face=3D"courier new, monospace">template<class T&=
gt;</font></div><div><font face=3D"courier new, monospace">struct B : A<=
T>=C2=A0</font></div><div><font face=3D"courier new, monospace">{=C2=A0<=
/font></div><div><font face=3D"courier new, monospace">=C2=A0 B(T t, int i)=
=C2=A0</font></div><div><font face=3D"courier new, monospace">=C2=A0 : A(t)=
//< nope</font></div><div><font face=3D"courier new, monospace">=C2=A0 =
{}=C2=A0</font></div><div><font face=3D"courier new, monospace">};</font></=
div><div><font face=3D"courier new, monospace"><br></font></div><div><font =
face=3D"courier new, monospace">int main()=C2=A0</font></div><div><font fac=
e=3D"courier new, monospace">{=C2=A0</font></div><div><font face=3D"courier=
new, monospace">=C2=A0 A c(12); //< yep</font></div><div><font face=3D"=
courier new, monospace">}</font></div></div><div><br></div><div><br></div><=
div>This case is not considered in=C2=A0<a href=3D"http://www.open-std.org/=
JTC1/SC22/WG21/docs/papers/2018/p1021r1.html">p1021</a>. Any reason what th=
is might be? An omission, a technical issue?</div><div>Because sooner or la=
ter people will wonder why it works in one context and not in other.</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/16f99f8f-6596-4450-98f8-1bd7332cb21c%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/16f99f8f-6596-4450-98f8-1bd7332cb21c=
%40isocpp.org</a>.<br />
------=_Part_194_247042594.1542227562251--
------=_Part_193_1890243296.1542227562251--
.