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

Is Session::GetSharedPtrFromThis mistakenly marked as private? #1145

Closed
epicbigcat opened this issue Nov 18, 2024 · 1 comment · Fixed by #1148
Closed

Is Session::GetSharedPtrFromThis mistakenly marked as private? #1145

epicbigcat opened this issue Nov 18, 2024 · 1 comment · Fixed by #1148
Assignees
Labels
Milestone

Comments

@epicbigcat
Copy link

epicbigcat commented Nov 18, 2024

Description

I noticed in #999 that Session is no longer movable/copyable. And it is recommended to use shared_ptr.

Session currently publicly inherits from std::enable_shared_from_this<Session>, so I can use session->shared_from_this(), but I noticed there is also a private function that provides the same functionality: Session::GetSharedPtrFromThis().

Is this a bug?

Example/How to Reproduce

See above :)

Possible Fix

Mark Session::GetSharedPtrFromThis() as a public.

Where did you get it from?

GitHub (branch e.g. master)

Additional Context/Your Environment

  • OS: Linux
  • Version: 1.11.0
@COM8
Copy link
Member

COM8 commented Nov 24, 2024

@epicbigcat thanks for reporting! Fixed in #1148

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

Successfully merging a pull request may close this issue.

2 participants