|The standarizers took great
pains to prevent the possibility of using auto_ptr as template parameters to
standard containers. Move semantics could easily break a standard container,
which thinks nothing of making temporary copies.
|Reference counted objects
are ok with standard containers. For instance, Alexandrescuís smart pointers
or Boost smart pointers will work correctly.
|Notice that syntactically a
container of smart pointers looks like a container of pointers, so you have
to get used to it. For instance, when you dereference an iterator, you get a
pointer. You have to use special pointer-accepting predicates for searching
and other standard algorithms.
|The biggest inconvenience of
this approach is that you essentially have to use ref-counted pointers
everywhere you would normally use auto_ptrs. What if you are a fan of
auto_ptrs? They are smaller, faster, and cooler.