Hello all,
I've a base class with a function template.
I derive from base class and try to have a specialization for the function template in derived class
I did something like this.
class Base
{
..
template <typename T>
fun (T arg) { ... }
};
class Derived : public Base
{
...
} ;
template <>
Derived::fun(int arg);
and in .cpp file I've provided implementation for the template specialization.
This works fine with MSVC 8.0 and g++-4.4.2 complains about lack of function declaration fun in Derived class.
I do not know which compiler is behaving correctly. Any help in this is greatly appreciated.
Thanks in advance, Surya