I have declared a class template which contains a virtual method with template parameter as its argument:
template<typename T>
class BaseClass {
...
virtual void SomeMethod(T arg) = 0;
...
};
Now, I want to create a class which is derived from the template and override the method:
class DerivedClass : public BaseClass<int> {
...
void SomeMethod(int arg); // Here was "const" modifier in my code
};
But when I want to create an instance of the DerivedClass, compiler complains "cannot declare field ... to be of abstract type". Is there any way how to override a method with template parameter as an argument?