Topic: template members in non-template classes?
Author: Shashaanka <shashank@sashimi.wwa.com>
Date: 1995/06/06 Raw View
>In D&E, Stroustrup discusses template members
>using such an example (Shape class). The example
>uses a virtual template member. I take it from
>the WP that virtual template members are not allowed.
Correct. The compiler can't know when compiling the definition
what different instantiations of a virtual funciton
there will eventually be.
>But are template members in non-template classes allowed ?
>Yes. But I don't know of any compilers that support it yet.
The Draft ANSI grammar doesn't seem to support it.
--
************************************************************
* Shashaanka *
* *
* 1134 Johnson Drive # 3317 *
* Buffalogrove IL 60089 *
* Tel: (708) 541 2726 *
* E Mail: shashank@sashimi.wwa.com *
************************************************************
Author: Shashaanka <shashank@sashimi.wwa.com>
Date: 1995/06/06 Raw View
>In D&E, Stroustrup discusses template members
>using such an example (Shape class). The example
>uses a virtual template member. I take it from
>the WP that virtual template members are not allowed.
Correct. The compiler can't know when compiling the definition
what different instantiations of a virtual funciton
there will eventually be.
>But are template members in non-template classes allowed ?
>Yes. But I don't know of any compilers that support it yet.
The Draft ANSI grammar doesn't seem to support it.
--
************************************************************
* Shashaanka *
* *
* 1134 Johnson Drive # 3317 *
* Buffalogrove IL 60089 *
* Tel: (708) 541 2726 *
* E Mail: shashank@sashimi.wwa.com *
************************************************************
Author: clerc@gla.ecoledoc.ibp.fr
Date: 1995/06/03 Raw View
In D&E, Stroustrup discusses template members
using such an example (Shape class). The example
uses a virtual template member. I take it from
the WP that virtual template members are not
allowed.
But are template members in non-template classes
allowed ?
---
Fabrice Clerc
clerc@gla.ecoledoc.ibp.fr
"The competent programmer is fully aware of the
strictly limited size of his own skull; therefore
he approaches the programming task in full humility".
E. Dijkstra
Author: clamage@Eng.Sun.COM (Steve Clamage)
Date: 1995/06/04 Raw View
clerc@gla.ecoledoc.ibp.fr writes:
>In D&E, Stroustrup discusses template members
>using such an example (Shape class). The example
>uses a virtual template member. I take it from
>the WP that virtual template members are not allowed.
Correct. The compiler can't know when compiling the definition
what different instantiations of a virtual funciton
there will eventually be.
>But are template members in non-template classes allowed ?
Yes. But I don't know of any compilers that support it yet.
--
Steve Clamage, stephen.clamage@eng.sun.com