Force all classes to implement / override a ‘pure virtual’ method in multi-level inheritance hierarchy

I found one mechanism, where at least we are prompted to announce the overridden method explicitly. It’s not the perfect way though. Suppose, we have few pure virtual methods in the base class B: class B { virtual void foo () = 0; virtual void bar (int) = 0; }; Among them, suppose we want … Read more