[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Template bug?
From: |
Martin Magnusson |
Subject: |
Template bug? |
Date: |
Fri, 16 Jul 2004 12:11:45 +0200 |
User-agent: |
Mozilla Thunderbird 0.6+ (Windows/20040608) |
I'm running GCC 3.3.1 under Cygwin, and the following code gives me the
error "test2.cpp:18: error: syntax error before `>' token"
In comp.lang.c++ it was suggested that this could be a compiler bug. Can
anybody here confirm that?
//////////////////////////////////////////////////////////////
template< int N, typename T >
class Vector
{
public:
Vector( int value )
{
i = value + N;
}
int i;
};
template< int N >
class Vertex
{
public:
Vertex( Vector<N,float> position = Vector<N,float>( 0 ) ); //Line 18
Vector<N,float> v;
};
int main()
{
Vertex<3> vert1;
}
//////////////////////////////////////////////////////////////
- Template bug?,
Martin Magnusson <=