class base
{
public:
virtual ~base();
virtual void foo();
};
class derived: public base
{
public:
~derived();
void foo();
};
derived::foo() does not need to be explicitly designated virtual (though it
is not an error to do so) - it is virtual by virtue of the fact that there
is a member function of the same signature in class base that is virtual.
Along the same lines, is derived::~derived() virtual because base::~base()
is virtual? Or must we explicitly designate derived::~derived() virtual if
we wish it to be so (say, if because we wish to derive from class derived)?