class Base {
public:
virtual void f() {}
};
class Derived : private Base {
public:
void f() override {}
};
My question is there any use to such override? Private inheritance implies that you can not store Derived
in Base
pointer and thus it will never be needed to dynamically dispatch f
to the correct type.