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]

Template bug.


Hi,

The following code snippet compiled with gcc-2.95.2 on a linux 686 machine with 
Mandrake 7.1 generates a parse error. It says "parse error before '>'". This 
only happens if A is a template class. If A is not a template class the code 
compiles fine.

Regards,

Pontus Åström



//----------------------------------------------------------
struct F
{
      template< class T1 >
      void g()
      {
      };
};


template< class T2 >
struct A
{
      A()
      {
	 F  f;
	 f.g< int >();
      };
};

int main()
{
   return 1;   
}


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