Using pure virtual methods for faux-interfaces in C++, what happens when a concrete class derives from two ‘interfaces’ which have an identical method declaration? e.g X sub-classes Iaaa and Ibbb and implements a method virtual void setVisible(bool);.
Does the fact Iaaa and Ibbb have no method body make things easier/better than a more classical diamond inheritance scenario, and lets X::setVisible be the implementation for both Iaaa::setVisible and Ibbb::setVisible?
I suppose a more C++ way of phrasing the question is “what happens when one class uses MI to derive from 2 classes which have identical signatures for a pure virtual method”.
The behavior is well defined. The derived class overriding method will constitute implementation of both the interfaces (i.e. abstract
classes with all purevirtualfunctions) methods.Also, 2 other points from your question
mentioned any common base for
IaaaandIbbbX::setVisible(bool)with same signature