O'Reilly logo
  • Ben Medina thinks this is interesting:

auto_ptrs have an unusual characteristic: copying them (via copy constructor or copy assignment operator) sets them to null, and the copying pointer assumes sole ownership of the resource!


Cover of Effective C++: 55 Specific Ways to Improve Your Programs and Designs, Third Edition


unique_ptrs solve this by prohibiting copying and forcing a move to transfer ownership.