[Advices] Class Hierarchy

  • Use multiple inheritance to separate implementation details from an interface
  • Use a virtual base to represent something common to some, but not all, classes in hierarchy
  • Don't declare data members protected
  • If a class defines operator delete(), it should have a virtual destructor
  • Don't call virtual functions during constructing or destructing

(via The C++ Programming Language, Third Edition by Bjarne Stroustrup, page 425)