> Extending the design to a thread-safe one is left as an exercise to the reader. Doesn't get much glibber than that!
That was mostly meant as irony/a joke, but I admit that's not really clear from the text... For the sake of clarity, if you need thread-safety, probably best to just use std::shared_ptr / std::weak_ptr.
There is now atomic_shared_ptr which is thread safe.