A
Alexander Stippler
Hi,
the following code does not compile. Why and how can I reach the desired
effect?
template <int n, typename T>
double
norm(const T &t)
{ return 0.0; }
template <typename T>
double
norm<2,T>(const T &)
{ return 2.0; }
class A
{
};
int
main()
{
A a;
norm<2>(a);
return 0;
}
regards,
alex
the following code does not compile. Why and how can I reach the desired
effect?
template <int n, typename T>
double
norm(const T &t)
{ return 0.0; }
template <typename T>
double
norm<2,T>(const T &)
{ return 2.0; }
class A
{
};
int
main()
{
A a;
norm<2>(a);
return 0;
}
regards,
alex