auto_ptr isn't what we want as it doesn't have move semantics (requirement of use in containers).  shared_ptr will have to do.