This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Template member - parse error
- To: ank at namesurfer dot com
- Subject: Re: Template member - parse error
- From: "Martin v. Loewis" <martin at loewis dot home dot cs dot tu-berlin dot de>
- Date: Sun, 5 Mar 2000 11:34:02 +0100
- CC: gcc-bugs at gcc dot gnu dot org, vpsiola at module dot ru
- References: <19991124160954.A21689@namesurfer.com>
> 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