M
Marcin Kalicinski
Why this does not compile (gcc 3.4.2 and latest Comeau):
struct A
{
template<class T>
T f(int a)
{
return T(a);
}
};
template<class T>
double g()
{
T t;
return t.f<double>(3); // <-- here
}
int main()
{
g<A>();
}
In the marked place gcc says "error: expected primary-expression before
double".
cheers,
Marcin
struct A
{
template<class T>
T f(int a)
{
return T(a);
}
};
template<class T>
double g()
{
T t;
return t.f<double>(3); // <-- here
}
int main()
{
g<A>();
}
In the marked place gcc says "error: expected primary-expression before
double".
cheers,
Marcin