architecture – Common base class of multiply inheriting classes

I’m using a 3rd party library with the following class hierarchy:

class A {};
class B {};
class C1 : public A, public B {};
class C2 : public A, public B {};

What would be a type that accepts instances of C1 and C2, giving access to all their public members inherited from A and B?

class D : public A, public B {}; does not work because the compiler doesn’t know how to convert from C1 or C2 to D.