title: std::auto_ptr or boost::shared_ptr for pImpl idiom?
body: <p>When using the <a href="http://en.wikipedia.org/wiki/Pimpl_idiom" rel="nofollow noreferrer">pImpl idiom</a> is it preferable to use a <code>boost:shared_ptr</code> instead of a <code>std::auto_ptr</code>?  I'm sure I once read that the boost version is more exception friendly?</p>
  
  <pre><code>class Foo
  {
  public:
      Foo();
  private:
      struct impl;
      std::auto_ptr&lt;impl&gt; impl_;
  };
  
  class Foo
  {
  public:
      Foo();
  private:
      struct impl;
      boost::shared_ptr&lt;impl&gt; impl_;
  };
  </code></pre>
  
  <p>[EDIT] Is it always safe to use std::auto_ptr&lt;> or are there situations when an alternative boost smart pointer is required?</p>