Here\'s a notable video (Stop teaching C) about that paradigm change to take in teaching the c++ language.
And an also notable blog post
Another possible valid use case is when you code some garbage collector.
Imagine that you are coding some Scheme interpreter in C++11 (or some Ocaml bytecode interpreter). That language requires you to code a GC (so you need to code one in C++). So ownership is not local, as answered by Yakk. And you want to garbage collect Scheme values, not raw memory!
You probably will end up using explicit new
and delete
.
In other words, C++11 smart pointers favor some reference counting scheme. But that is a poor GC technique (it is not friendly with circular references, which are common in Scheme).
For example, a naive way of implementing a simple mark-and-sweep GC would be to collect in some global container all the pointers of Scheme values, etc...
Read also the GC handbook.