std::unique_ptr
is for exclusive ownership.
std::shared_ptr
is for shared ownership.
So it looks like a raw pointer is left just the job of being a non-owning pointer, at least in good code.
But if I see a raw pointer somewhere, I actually don't know if it is truly just observing the pointee, or it is used somewhere to delete
it or to create a new
object.
Is there anything in the C++ language, or an accepted idiom, to model a non-owning view on some resource?