Can a C++ class extend both a class and implement an Interface in C++ ?
In this case, we have an implementation class (Impl1) that implements two interfaces A and B. We also have another implementation class (Impl2) that implements two interfaces A and B.
The logic for Interface B implementation is the same in both implementation classes (Impl1 and Impl2), so we are simply replicating the class B implementation in both Impl1 and Impl2. So, in order to make it more efficient, can I create a common class that contains implementation logic for B, and both implementation classes (Impl1, Impl2) can inherit from that common logic instead of individually implementing B?