Specialization in templates

Matthias Seeger un9i@rz.uni-karlsruhe.de
Tue Oct 27 16:33:00 GMT 1998


Hello!

When trying to compile code like

template<class T> class A<T*> {
};

my EGCS compiler stops with "parse error before <'" (egcs-2.91.57,
x86-linux). Does this mean that templete specialization (Stroustrup, 3rd
ed., p.341) is not yet supported by EGCS?

In that case: Are there any plans to support it in the near future? I
consider it an highly valueable feature within the template framework.
With specialization it is possible to realize nested types such as
   vector<vector<...<vector<int>>...>>
of (potentially) arbitrary depth by implementing no more than 2 template
classes:
   template<class T> class A<vector<T> > and
   template<class T> class A

Yours sincerely
-- 
Matthias Seeger		eMail: Matthias.Seeger@stud.uni-karlsruhe.de



More information about the Gcc mailing list