Topic: Time for Revisiting the Prohibition on Templatized


Author: Bryce Glover <randomdsdevel@gmail.com>
Date: Wed, 11 Nov 2015 16:02:00 -0500
Raw View
--Apple-Mail=_8860B82C-7A32-4EF4-9DAC-750A4645EBA2
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=UTF-8

     Given the attached examples of the frequency with which people seem to=
 be creating workarounds for the fact that C++ does not currently support t=
emplatized virtual member functions, should the committee reconsider its co=
llective decision to prohibit that construct?  I believe that the reason th=
at the feature was rejected in the first place was because it would be over=
ly troublesome to implement, especially from a linker designer=E2=80=99s po=
int of view, but is that still the case now? =20

Curious,=20
     Bryce Glover
     RandomDSdevel@gmail.com <mailto:RandomDSdevel@gmail.com>

Links: =20
From example Stack Overflow questions: =20
=E2=80=98Member template functions cannot be virtual - workaround?=E2=80=99=
 <http://stackoverflow.com/questions/8099877/member-template-functions-cann=
ot-be-virtual-workaround?s=3D2%7C2.8036>
=E2=80=98Template virtual member functions [duplicate]' <http://stackoverfl=
ow.com/questions/4166894/templated-virtual-member-functions?s=3D3%7C2.5634>
=E2=80=98Can a member function template be virtual?=E2=80=99 <http://stacko=
verflow.com/questions/2354210/can-a-member-function-template-be-virtual>
=E2=80=98How to circumvent virtual template member functions?=E2=80=99 <htt=
p://stackoverflow.com/questions/24417358/how-to-circumvent-virtual-template=
-member-functions?s=3D8%7C1.5221>
;Member function templates cannot be declared virtual - From Addison Wesley=
: C++ Templates; <http://stackoverflow.com/questions/5742531/member-functio=
n-templates-cannot-be-declared-virtual-from-addison-wesley-c?s=3D13%7C1.153=
9>
=E2=80=98need a virtual template member workaround=E2=80=99 <http://stackov=
erflow.com/questions/2939860/need-a-virtual-template-member-workaround>
=E2=80=98Yet another virtual template workaround=E2=80=99 <http://stackover=
flow.com/questions/25120459/yet-another-virtual-template-workaround?lq=3D1>
=E2=80=A6 (Many more example questions can be found among the results of a =
search for terms like =E2=80=98[C++] virtual member template function;=E2=
=80=99 I got 849 for that search in particular, though not all of the resul=
ts were, of course, relevant=E2=80=A6) =20
From discussion on this mailing list: =20
=E2=80=98Using override & final to support virtual template methods in subc=
lasses=E2=80=99 <https://groups.google.com/a/isocpp.org/d/topic/std-proposa=
ls/OWfd5SX_-1s/discussion>

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

--Apple-Mail=_8860B82C-7A32-4EF4-9DAC-750A4645EBA2
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset=UTF-8

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html charset=
=3Dutf-8"></head><body style=3D"word-wrap: break-word; -webkit-nbsp-mode: s=
pace; -webkit-line-break: after-white-space;" class=3D""><div>&nbsp; &nbsp;=
 &nbsp;Given the attached examples of the frequency with which people seem =
to be creating workarounds for the fact that C++ does not currently support=
 templatized virtual member functions, should the committee reconsider its =
collective decision to prohibit that construct? &nbsp;I believe that the re=
ason that the feature was rejected in the first place was because it would =
be overly troublesome to implement, especially from a linker designer=E2=80=
=99s point of view, but is that still the case now? &nbsp;</div><div><br cl=
ass=3D""></div><div><div class=3D"">Curious,&nbsp;</div><div class=3D"">&nb=
sp; &nbsp; &nbsp;Bryce Glover</div><div class=3D"">&nbsp; &nbsp; &nbsp;<a h=
ref=3D"mailto:RandomDSdevel@gmail.com" class=3D"">RandomDSdevel@gmail.com</=
a></div><div class=3D""><br class=3D""></div><div class=3D"">Links: &nbsp;<=
/div><div class=3D""><ul class=3D"MailOutline"><li class=3D"">From example =
Stack Overflow questions: &nbsp;</li><ul class=3D""><li class=3D""><a href=
=3D"http://stackoverflow.com/questions/8099877/member-template-functions-ca=
nnot-be-virtual-workaround?s=3D2%7C2.8036" class=3D"">=E2=80=98Member templ=
ate functions cannot be virtual - workaround?=E2=80=99</a></li><li class=3D=
""><a href=3D"http://stackoverflow.com/questions/4166894/templated-virtual-=
member-functions?s=3D3%7C2.5634" class=3D"">=E2=80=98Template virtual membe=
r functions [duplicate]'</a></li><li class=3D""><a href=3D"http://stackover=
flow.com/questions/2354210/can-a-member-function-template-be-virtual" class=
=3D"">=E2=80=98Can a member function template be virtual?=E2=80=99</a></li>=
<li class=3D""><a href=3D"http://stackoverflow.com/questions/24417358/how-t=
o-circumvent-virtual-template-member-functions?s=3D8%7C1.5221" class=3D"">=
=E2=80=98How to circumvent virtual template member functions?=E2=80=99</a><=
/li><li class=3D""><a href=3D"http://stackoverflow.com/questions/5742531/me=
mber-function-templates-cannot-be-declared-virtual-from-addison-wesley-c?s=
=3D13%7C1.1539" class=3D"">;Member function templates cannot be declared vi=
rtual - From Addison Wesley: C++ Templates;</a></li><li class=3D""><a href=
=3D"http://stackoverflow.com/questions/2939860/need-a-virtual-template-memb=
er-workaround" class=3D"">=E2=80=98need a virtual template member workaroun=
d=E2=80=99</a></li><li class=3D""><a href=3D"http://stackoverflow.com/quest=
ions/25120459/yet-another-virtual-template-workaround?lq=3D1" class=3D"">=
=E2=80=98Yet another virtual template workaround=E2=80=99</a></li><li class=
=3D"">=E2=80=A6 (Many more example questions can be found among the results=
 of a search for terms like =E2=80=98[C++] virtual member template function=
;=E2=80=99 I got 849 for that search in particular, though not all of the r=
esults were, of course, relevant=E2=80=A6) &nbsp;</li></ul><li class=3D"">F=
rom discussion on this mailing list: &nbsp;</li><ul class=3D""><li class=3D=
""><a href=3D"https://groups.google.com/a/isocpp.org/d/topic/std-proposals/=
OWfd5SX_-1s/discussion" class=3D"">=E2=80=98Using override &amp; final to s=
upport virtual template methods in subclasses=E2=80=99</a></li></ul></ul></=
div></div></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=_8860B82C-7A32-4EF4-9DAC-750A4645EBA2--

.