This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Specialization in templates
- To: egcs at cygnus dot com
- Subject: Specialization in templates
- From: un9i at rz dot uni-karlsruhe dot de (Matthias Seeger)
- Date: Tue, 27 Oct 1998 23:00:59 +0100 (CET)
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