I have 3 classes, A, B, and C where B is an A and C is an A.
These classes are designed to retain history, so A provides a virtual method that derived classes can create to be notified when the history should be archived, called void archive().
Now suddenly there is a need to have the information from A, B, and C in a single class and I am not sure the best approach.
I thought about creating a new class D that inherits from B and C, and changing their inheritance to virtual public A to avoid diamond problem and have D::archive() simply call B::archive() and C::archive().
Is this a good approach? Or should I redesign the 4 classes such that I don’t use multiple inheritance?
Your approach is the standard one. C++ has multiple-inheritance, and you should feel free to use it. It looks like you know how to do it correctly.