Specialization in templates
Alexandre Oliva
oliva@dcc.unicamp.br
Fri Oct 30 02:40:00 GMT 1998
Matthias Seeger <un9i@rz.uni-karlsruhe.de> writes:
> template<class T> class A<T*> { };
> my EGCS compiler stops with "parse error before <'"
And it is correct.
> Does this mean that templete specialization (Stroustrup, 3rd ed.,
> p.341) is not yet supported by EGCS?
Nope; specialization is supported, but, in order to specialize a
template, you must first declare it.
Before the specialization, insert the following line and you're done:
template<class T> class A;
--
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:oliva@gnu.org mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil
More information about the Gcc
mailing list