title: Can a class be aware of superclasses when used multiple inheritance?
body: <p>I am considering to use multiple inheritance as a part of the design of my library. The user defines components that are described as a <em>stateless</em> class (<code>Component1</code>, <code>Component2</code>, <code>Component3</code>) each with the same <code>typedefs</code> and static members. See the example of <code>Component1</code> below. Other component classes are defined the same way, defining the sub classes, typedefs and static members with the same names.</p>
  
  <p>I also want the user to be able to define the combination of several components as another class (<code>Combined</code>). One way of doing it is through the multiple inheritance (see definition below), but I would need the combined class to be automatically aware of the components it was build from. The order of the components matters. </p>
  
  <pre><code>struct Component1{
      using MyType = int; //each class defines several standard typedefs
      using return_type = int; 
      struct Parameters {
          constexpr auto static parameter_set = 42;
      }; //classes also define static subclasses
      static return_type myfun(MyType); //and static functions that get defined elsewhere.
  };
  
  struct Component2 {/* This class have the same duck-type (public interface) as Base1*/  };
  
  struct Component3 {}; //likewise
  
  struct Combined: public Component1, public Component3, public Component2 {
     //I want this to be automatically generated:
     using members = std::tuple&lt;Component1, Component3, Component2&gt;; 
  };
  </code></pre>
  
  <p>Or perhaps there is another way of delivering a similar API?</p>