title: Why auto_ptr initialization using the assignment syntax is not allowed
body: <p>I was reading through this book
  <a href="http://www.josuttis.com/libbook/" rel="nofollow">C++ standard library book</a></p>
  
  <p>And here is the part i can not understand:</p>
  
  <blockquote>
    <p>Note that class auto_ptr&lt;> does not allow you to initialize an object with an ordinary pointer by
    using the assignment syntax.</p>
  </blockquote>
  
  <pre><code>std::auto_ptr&lt;ClassA&gt; ptr1(new ClassA); //ok
  std::auto_ptr&lt;ClassA&gt; ptr2 = new ClassA; //error
  </code></pre>
  
  <p>I don't understand why it is not allowed. What kind of pitfalls they were trying to avoid by not allowing initialization with assignment syntax</p>