This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Specialization in templates


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

Yes, but ideally the compiler would give a better error message for
this case, one that would help the user more.

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

Maybe some sort of error recovery pattern could be added that would
recognize that this is an attempt to specialize a template that has
not been declared.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]