While going through the auto_ptr implementation, i come across one query.

The auto_ptr_ref struct is specifically designed for copying the non const auto_ptr s. I am not able to understand the exact need of this auto_ptr_ref in copy construcotr and assignment operator of auto_ptr class.

It would be of great help if some one clarifies it ....


thanks in advance

-sanjay