what special-functionality that is not provided by these libraries
I am thinking about (writing) a library, which would allow:
- one pointer having ownership, many others just "observing"
- in debug mode, reference counting for the observers
- one shared (reference counted) pointer type automatically
chosing between intrusive and non-intrusive policy depending
on whether the pointed object's class have appropriate methods
(e.g. T::add_ref, T::remove_ref);
- explicit ownership passing instead of the destructible
copy for type of pointers with only one owner
- a pointer type assuring uniquness (being the only pointer
to the object)
I think, I would also choose very short names for the smart
pointer types. My choice is:
- unq<T> // unique pointer
- own<T> // the only owner, ref(erences) may exist
- shr<T> // shared, appropriate for collections, ref(erences) may
exist
- ref<T> // observing only reference, not owning
- val<T> // value type with smart pointer syntax
As you can see, I have some quite good idea about what
I am expecting. And this is something I am going to create,
but I am just checking if this approach haven't been
implemented yet.