title: boost weak_ptr_cast in shared_from_this()
body: <p>I'm using boost's shared pointers, and <code>enable_shared_from_this</code> to enable returning a shared pointer to this.  Code looks like this:</p>
  
  <pre><code>class foo : public boost::enable_shared_from_this&lt;foo&gt;
  {
    boost::shared_ptr&lt;foo&gt; get()
    {
      return shared_from_this();
    }
  }
  </code></pre>
  
  <p>Why would shared_from_this throw a weak_ptr_cast exception?</p>