title: Inherit from multiple partial implementations of an abstract base class?
body: <p>Is it possible to have a number of <strong>partial implementations</strong> of an abstract interface, and then <strong>collect</strong> these partial implementations into a <strong>single concrete class</strong> by using multiple inheritence?</p>
  
  <p>I have the following example code:</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  struct Base
  {
      virtual void F1() = 0;
      virtual void F2() = 0;
  };
  
  struct D1 : Base
  {
      void F1() override { std::cout &lt;&lt; __func__ &lt;&lt; std::endl; }
  };
  
  struct D2 : Base
  {
      void F2() override { std::cout &lt;&lt; __func__ &lt;&lt; std::endl; }
  };
  
  // collection of the two partial implementations to form the concrete implementation
  struct Deriv : D1, D2
  {
      using D1::F1; // I added these using clauses when it first didn't compile - they don't help
      using D2::F2;
  };
  
  int main()
  {
      Deriv d;
      return 0;
  }
  </code></pre>
  
  <p>This fails to compile with the following errors:</p>
  
  <pre><code>main.cpp: In function ‘int main()’:
  main.cpp:27:11: error: cannot declare variable ‘d’ to be of abstract type ‘Deriv’
  main.cpp:19:8: note:   because the following virtual functions are pure within ‘Deriv’:
  main.cpp:5:18: note:    virtual void Base::F1()
  main.cpp:6:18: note:    virtual void Base::F2()
  </code></pre>