It depends. If both functions have the same signature, and you want to
replace both of them with the same function, then just do it; there is
no problem, and your function will implement both of them. If they have
different signatures, then you'll need two different functions to
implement them. And if you want different implementations (likely the
case if the interfaces are unrelated), but they have the same signature,
then you'll need to introduce intermediate classes to "rename" them,
e.g.:
class MaskSetVisibleInAaa : public Aaa
{
virtual void setVisibleInAaa( bool ) = 0;
virtual void setVisible( bool newStatus )
{
setVisibleInAaa( newStatus );
}
};
class MaskSetVisibleInBbb : public Bbb
{
virtual void setVisibleInBbb( bool ) = 0;
virtual void setVisible( bool newStatus )
{
setVisibleInBbb( newStatus );
}
};
class ConcreteImplementation
: public MaskSetVisibleInAaa
, public MaskSetVisibleInBbb
{
virtual void setVisibleInAaa( bool );
virtual void setVisibleInBbb( bool );
};
(I would also question your use of "faux-interface". C++ fully supports
real interfaces—more so, in fact, than some other languages which
have an interface
keyword. An interface defines a contract; which,
unless the language has special support for programming by contract,
implies in most cases concrete code in the interface, with virtual
functions being private.)