B
BigMan
Why g++ 2.95.4 does no compile the code at the end of the message? I
think the code is perfectly standard since 2 other compilers did
compile it (Microsoft C++ compiler that ships with MS VS.NET & Comeau
online compiler). If the problem is with the gnu compiler (version
2.95.4), is there any workaround? If there is no workaround, what
version of g++ compiles this code?
class c
{
public:
c( ) { }
template< unsigned int t >
void f( ) const
{
}
};
template< unsigned int t2 >
void f2( c const& cc)
{
cc.f< t2 >( ); // Here I get "parse error before `('".
}
int main
(
)
{
c const cc;
f2< 2 >( cc );
return 0;
}
think the code is perfectly standard since 2 other compilers did
compile it (Microsoft C++ compiler that ships with MS VS.NET & Comeau
online compiler). If the problem is with the gnu compiler (version
2.95.4), is there any workaround? If there is no workaround, what
version of g++ compiles this code?
class c
{
public:
c( ) { }
template< unsigned int t >
void f( ) const
{
}
};
template< unsigned int t2 >
void f2( c const& cc)
{
cc.f< t2 >( ); // Here I get "parse error before `('".
}
int main
(
)
{
c const cc;
f2< 2 >( cc );
return 0;
}