B
Boston
my version of the STL has the following documentation:
You can pass an auto_ptr<Type> object by value as an argument to a function
call. You can return such an object by value as well. Both operations depend
on the implicit construction of intermediate objects of class
auto_ptr<Type>::auto_ptr_ref<Other>, by various subtle conversion rules. You
cannot, however, reliably manage a sequence of auto_ptr<Type> objects with a
Standard Template Library container.
Is this restriction against having, say, a vector of auto_ptr normal? If
so, why?
You can pass an auto_ptr<Type> object by value as an argument to a function
call. You can return such an object by value as well. Both operations depend
on the implicit construction of intermediate objects of class
auto_ptr<Type>::auto_ptr_ref<Other>, by various subtle conversion rules. You
cannot, however, reliably manage a sequence of auto_ptr<Type> objects with a
Standard Template Library container.
Is this restriction against having, say, a vector of auto_ptr normal? If
so, why?