title: shared_ptr<Base> and objects from derived classes
body: <p>Given something like this:</p>
  
  <pre><code>class Base {...};
  class D1 : public Base {...};
  class D2 : public Base {...};
  </code></pre>
  
  <p>In my code, is it legal to use <code>std::shared_ptr&lt;Base&gt;</code> to manage the lifetime and pass around objects of types <code>D1</code> and <code>D2</code>?  Or could this cause a world of pain?</p>