Issue 123960

Summary: Replace uses of auto_ptr with standard compliant smart pointers
Product: General Reporter: hdu <hdu>
Component: codeAssignee: AOO issues mailing list <issues>
Status: CONFIRMED --- QA Contact:
Severity: Normal    
Priority: P3 CC: issues
Version: 4.1.0-dev   
Target Milestone: ---   
Hardware: All   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Issue Depends on:    
Issue Blocks: 122766, 122208    

Description hdu@apache.org 2014-01-03 09:23:59 UTC
The auto_ptr template was deprecated in C++11 because it has many well known problems that are solved by tts modern counterpart unique_ptr.

Auto_ptr was also often abused in cases where it shouldn't have been used. The shared_ptr and weak_ptr might be the suitable replacements in these cases. Also if auto_ptr was misemployed to manage arrays then the replacement should get custom deleters to do the delete[] for destructing the array. It's too bad that e.g. boost's shared_array_ptr didn't make it into the C++11 standard.