cxx icon indicating copy to clipboard operation
cxx copied to clipboard

Add UniquePtr::to_shared and SharedPtr::from_unmanaged

Open russelltg opened this issue 2 years ago • 3 comments

This adds a way to create SharedPtr's from C++ pointers created with new (or via unique_ptrs).

I'm a new contributor here, let me know if I did this in a reasonable way, and I'm happy to put some effort in if this is something that's interesting.

russelltg avatar Jan 25 '22 21:01 russelltg

I fixed that error and added an additional test to cover the situation, but it needs approval to run again. Just pinging just in case you don't get commit notifications.

russelltg avatar Jan 26 '22 18:01 russelltg

Freshly rebased onto master :)

russelltg avatar Dec 11 '22 20:12 russelltg

Hmm I think it would be reasonable also to implement SharedPtr<T> from UniquePtr<T>, happy to add that if you agree.

russelltg avatar Sep 26 '23 04:09 russelltg