This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Template bug.
- To: bug-gcc at gnu dot org
- Subject: Template bug.
- From: Pontus Aastroem <pa at tde dot lth dot se>
- Date: Tue, 3 Oct 2000 17:23:53 +0200 (MEST)
- Reply-To: Pontus Aastroem <pa at tde dot lth dot se>
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;
}