Category : auto-ptr

What would be a simple C++ program where a std::vector<std::auto_ptr<T>> compiles but fails to execute correctly, but where the same program with std::vector<std::uniq_ptr<T>> compiles and works correctly, for some data type T? I know that std::auto_ptr has been deprecated or removed; I just want an example involving containers to motivate why it was deprecated or ..

Read more