T
Trevor Morgan
I've been having problems when a templated member function has the same name
as ANY previously defined template parameter.
Here's the simplest case that demonstrates the problem.
This fails to compile under VC++ version 7.0
It has no problems under gcc.
//begin code
template <class T>
struct A
{};
struct B
{
template <typename TYPE>
void T()
{}
};
int main(int,char**)
{
B b;
b.T<int>();//error c2062: type 'int' unexpeced
return 0;
}
//end code
as ANY previously defined template parameter.
Here's the simplest case that demonstrates the problem.
This fails to compile under VC++ version 7.0
It has no problems under gcc.
//begin code
template <class T>
struct A
{};
struct B
{
template <typename TYPE>
void T()
{}
};
int main(int,char**)
{
B b;
b.T<int>();//error c2062: type 'int' unexpeced
return 0;
}
//end code