No, this is not a problem for the compiler writer:
- In general, a compiler writer can determine how multiple inheritance works.
- In particular, for C ++, there are several solutions for the writer.
This is a problem for a C ++ programmer, but only if you donβt understand how MI works in C ++.
I have one general solution, which should be a base class that defines an open interface, which you then consider to have separate subkeys, which then execute as various abstract classes that are inherited by the inherited concrete leaf class:
------ | Base | ------ | | ------ ^ | ----------------- | | | ------ ------ ------ | A | | B | | C | ------ ------ ------ | | | | | | ------ ------ ------ ^ ^ ^ | | | ----------------- | ------- |Derived| ------- | | -------
Each of A, B, and C implements nonoverlapping subkeys of Base, which means that you can replace A for A 'for an alternative or improved implementation without affecting any other class.
source share