You shouldn't use std::auto_ptr
, its deprecated and I consider it dangerous, even more so when you hide it behind such a generic typedef as Ptr
.
I don't think it makes any sense to called shared_ptr
Ref, in this case it is more Ptr
than auto_ptr
.
EDIT: I consider it dangerous because you can easily misuse it, even when you fully understand its workings, you can accidentally misuse it, especially when hiding it behind a typedef. A good class should be easy to use right and should be difficult to misuse. Especially with the advent of unique_ptr
I can't see any useful scenario for auto_ptr
.