This is the mail archive of the gcc-bugs@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: Template member - parse error


> struct A {
> 	template<class T1>    void f() {}
> };
> 
> template<class T2> struct B{  
> 	void g(){ A a; a.f<int>(); }
> };
> -----------------------------------------------
> causes "parse error" while it should not.
> EDG-based compiler does not complain.

Thanks for your bug report. This is a known bug; the work-around is to
write

  a.template f<int>();

Regards,
Martin

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