The following question may not be related to boost, but if a solution can be found with boost or otherwise would be great.
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.
////////////////////////// Header file begin //////////////////////////
class BaseĀ
{
..
template <typename T>
fun (T arg) { ... }
};
class Derived : public Base
{
...
} ;
template <>
Derived::fun(int arg);
///////////////////////// Header file end ////////////////////////////
and in .cpp file I've provided implementation for the template specialization.
This works fine with MSVC 8.0 and g++ 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