title: What is the danger of passing an auto_ptr to a function expecting a constant reference to an auto_ptr?
body: <p>Nicolai Josuttis, in his book "The C++ Standard Library - A Tutorial and Reference", writes, at page 44, the following paragraph :</p>
  
  <blockquote>
    <p>According to the concept of auto_ptrs, it is possible to transfer ownership into a function by using a constant reference. This is very dangerous because people usually expect that an object won't get modified when you pass it as a constant reference. Fortunately, there was a late design decision that made auto_ptrs less dangerous. By some tricky implementation techniques, transfer of ownership is not possible with constant references. In fact, you can't change the ownership of any constant auto_ptr: &hellip;</p>
  </blockquote>
  
  <p>If is not possible to change ownership with a constant reference, why the expressions "This is very dangerous" and "less dangerous" above ?</p>