title: Use of enable_shared_from_this with multiple inheritance
body: <p>BI am using <code>enable_shared_from_this</code> in my code, and I am not sure if its usage is correct. This is the code:</p>
  
  <pre><code>class A: public std::enable_shared_from_this&lt;A&gt;
  {
  public:
      void foo1()
      {
          auto ptr = shared_from_this(); 
      }
  };
  
  class B:public std::enable_shared_from_this&lt;B&gt;
  {
  public:
      void foo2()
      {
          auto ptr = shared_from_this(); 
      }
  };
  
  class C:public std::enable_shared_from_this&lt;C&gt;
  {
  public:
      void foo3()
      {
          auto ptr = shared_from_this(); 
      }
  };
  
  class D: public A, public B, public C
  {
  public:
      void foo()
      {
          auto ptr = A::shared_from_this(); 
      }
  };
  </code></pre>
  
  <p>Are these usage of <code>make_shared_from_this()</code> correct, assuming that they are always being called through <code>shared_ptr</code> of D?</p>