title: boost::shared_ptr and assigning derived classes
body: <p>Assume <code>DerivedClass</code> is derived from <code>BaseClass</code><br>
  Would the following work?</p>
  
  <pre><code>boost::shared_ptr&lt;BaseClass&gt; a(new BaseClass());
  boost::shared_ptr&lt;DerivedClass&gt; b(new DerivedClass());
  a=b;
  </code></pre>
  
  <p>Following this <a href="https://stackoverflow.com/questions/3697329/question-on-assignment-with-boostshared-ptr-vs-the-reset-function">question</a>, I understand that now <code>a</code> points to the derived and <code>b</code> points to the base (right?)</p>
  
  <p>Also, now if I call a function via <code>a</code> would it call the derived implementation?</p>