Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add UniquePtr::to_shared and SharedPtr::from_unmanaged #1005

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

russelltg
Copy link

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
Copy link
Author

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
Copy link
Author

Freshly rebased onto master :)

@russelltg russelltg force-pushed the uniq2shared branch 2 times, most recently from 781580e to 8d1705b Compare January 21, 2023 16:52
@russelltg
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant