Chapter 37. AUTO_PTR

Difficulty: 8

This Item covers basics about how you can use the standard auto_ptr safely and effectively.

Historical note: The original simpler form of this Item, appearing as a Special Edition of Guru of the Week, was first published in honor of the voting out of the Final Draft International Standard for Programming Language C++. It was known/suspected that auto_ptr would change one last time at the final meeting, where the standard was to be voted complete (Morristown, New Jersey, November 1997), so this problem was posted the day before the meeting began. The solution, freshly updated to reflect the prior day's changes to the standard, became the first published treatment of the standard auto_ptr.

Many thanks from all of ...

Get Exceptional C++: 47 Engineering Puzzles, Programming Problems, and Solutions now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.