It gives up auto_ptr and adds unique_ptr and shared_ptr. Are they good enough to let c++ abandon auto_ptr? There must be sometimes auto_ptr could lead to bad results. Can anyone give me an example?
If it doesn't do bad C++11 will keep it rather than give up.
Because unique_ptr is a better alternative for auto_ptr.
In particular, it was not possible to store an auto_ptr in a container. While you can store unique_ptr in a container.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With