Yes, everyone says no here. I say yes, it makes sense.
class VirtualBase { public: virtual void vmethod() = 0;
Creating private inheritance does not mean that you cannot access VirtualBase members from outside the class, it means that you cannot access these elements through the Concrete link. However, Concrete and his friends can transfer instances of Concrete to VirtualBase , and then anyone can access public members. Simply put,
Concrete *obj = new Concrete; obj->vmethod(); // error, vmethod is private VirtualBase *obj = VirtualBase::global; obj->vmethod(); // OK, even if "obj" is really an instance of Concrete
source share