What you can do is put all the common materials in the virtual database, say C_base and override the conflicting virtual functions in the helper classes. Since the common stuff for C readily available in C_base , it essentially resembles the most derived C Finally, you are a C class simply because the class pulls things together:
struct A { virtual void foo() = 0; }; struct B { virtual int foo() = 0; }; struct C_base { int all_data; }; struct A_aux: virtual C_base, A { void foo() { std::cout << "A_aux::foo()\n"; } }; struct B_aux: virtual C_base, B { int foo() { std::cout << "B_aux::foo()\n"; return 0; } }; struct C : A_aux, B_aux { using A_aux::foo; };
Dietmar Kühl
source share