Closed scheibel closed 9 years ago
Although the name suggests, Reference
Okay, just being curious here: Why would such a wrapper be useful? Why not just use a pointer if that is all that it contains and it doesn't add functionality on top of it?
@mrzzzrm: If no default ownership for raw pointers exists for your project, then a user may not know the ownership of a pointer.
@all: seems like we rewrite the complete ownership of pointers in globjects and we will strive for single use-case, writer-driven pointer ownership with strong focus on arbitrary ownership for pointers. This means, that we want to use strong ownership (unique_ptr) as often as possible, shared ownership (shared_ptr) sometimes where needed, distributed ownership (ref_ptr) never and no ownership (raw pointer) consequently and as often as possible.
What's the purpose of the
Reference<T>
wrapper? Some doc may be helpful. (And maybestd::reference_wrapper<T>
can provide the same?)