In C++, it is legal to give an implementation of a pure virtual function:
class C
{
public:
virtual int f() = 0;
};
int C::f()
{
return 0;
}
Because it's regarded as ill formed to write:
class Funct {
public:
virtual int doit(int x) = 0;
virtual ~Funct() = 0 {};
};
The destructor will still be called if you derive from this class. Declaring all methods pure virtual is just for clarity. You might as well write it like this:
class Funct {
public:
virtual int doit(int x) = 0;
virtual ~Funct() {};
};
The class will still be abstract since at least one method is pure virtual. The destructor is also still inline.