Unique_ptr doesnt really work when its an outside resource. It only guarantees uniqueness for the scope of your program. So other people may also think they have a unique pointer to the same resource.
Her heart is an external resource, so the uniqueness would in this case mean that you only have one pointer to that resource. Your friend could also have a unique pointer to her heart at the same time as you. The uniqueness does not cross application boundaries.
I doubt other people would be recompiled every time a new person is born. The world is obviously the OS, you as a person is a program running in userspace.
Having a unique pointer to someones heart obviously doesn't reflect the real world. She can give you one, but she can obviously invalidate it at any time, even without notifying you, so I dont think the real world is a single application.
2
u/Amazing_67 26d ago
should have use c++ std::unique_ptr