Skip to content

Enable STL-style enable_shared_from_this #1295

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

Merged
merged 1 commit into from
Sep 15, 2024
Merged

Conversation

mrdomino
Copy link
Collaborator

@mrdomino mrdomino commented Sep 15, 2024

No description provided.

This way of doing it is kind of lame in that it is not possible to refer
to weak_this during object construction but this is how the STL does it.
The other would be to detect if there is a constructor that takes a weak
reference followed by Args in make_shared, but this does the wrong thing
if someone wrote their code not expecting that behavior to exist.
@jart jart merged commit ef62730 into jart:master Sep 15, 2024
6 checks passed
@mrdomino mrdomino deleted the ctl-shared-this branch September 16, 2024 15:30
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.

2 participants