title: GCC error: cannot convert 'const shared_ptr<...>' to 'bool' in return
body: <p>I'm switching to GCC 4.6.1, and it starts to complain about code which works fine with GCC 4.4 and MSVC10. It seems that it doesn't want to convert between <code>shared_ptr</code> and <code>bool</code> when returning from a function like this:</p>
  
  <pre><code>class Class { shared_ptr&lt;Somewhere&gt; pointer_; };
  
  bool Class::Function () const
  {
      return pointer_;
  }
  </code></pre>
  
  <p>using </p>
  
  <pre><code>return static_cast&lt;bool&gt; (pointer_);
  </code></pre>
  
  <p>everything works. What the heck is going on? This is with <code>--std=cpp0x</code>.</p>