cppannotations/yo/stl/autoptr.yo
Frank B. Brokken 6723551a46 Latex cleanup
git-svn-id: https://cppannotations.svn.sourceforge.net/svnroot/cppannotations/trunk@433 f6dd340e-d3f9-0310-b409-bdd246841980
2010-02-28 18:07:35 +00:00

20 lines
978 B
Text

The (now deprecated by the C++0x standard) smart pointer class
hi(auto_ptr)tt(std::auto_ptr<Type>) has traditionally been offered by
bf(C++). This class does not support emi(move semantics), but when an
tt(auto_ptr) object is assigned to another, the right-hand object loses its
information.
The class tt(unique_ptr) does not have tt(auto_ptr)'s drawbacks and
consequently using tt(auto_ptr) is now deprecated. tt(Auto_ptrs) suffer from
the following drawbacks:
itemization(
it() they do not support em(move semantics);
it() they should not be used to point to arrays;
it() they cannot be used as data types of abstract containers.
)
Because of its drawbacks and available replacements the tt(auto_ptr) class is
longer covered by the annotations(). Existing software should be modified to
use smart pointers (tt(unique_ptrs) or tt(shared_ptrs)) and new software
should, where applicable, directly be implemented in terms of these new
smart pointer types.