title: Make sure only Smartpointers are build
body: <p>I want to make sure only smart pointers are build from my classes so i made all constructors protected.</p>
  
  <p>To create objects i build this "Buildable"-Policy:</p>
  
  <pre><code>template &lt;typename T&gt;
  class Buildable
  {
  public:
      template&lt;typename ...Args&gt;
      static QSharedPointer&lt;T&gt; buildObject(Args&amp;&amp;... all) 
  {
          return QSharedPointer&lt;T&gt;( new T(std::forward&lt;Args&gt;(all)...) );
  }
  
  };
  </code></pre>
  
  <p>If i use this this policy in a base class, all goes well.
  But when i use it in base and a derived class like this:</p>
  
  <pre><code>class A : public Buildable&lt;A&gt; {}
  class B : A, public Buildable&lt;B&gt;{}
  </code></pre>
  
  <p>the compiler argues: Error: member 'buildObject' found in multiple base classes of different types</p>
  
  <p>I don't know how to solve this problem. Any ideas?</p>