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

Dereference operator for Proxy class in smart_lock #1966

Closed
FerdinandSpitzschnueffler opened this issue Apr 11, 2023 · 0 comments · Fixed by #1967
Closed

Dereference operator for Proxy class in smart_lock #1966

FerdinandSpitzschnueffler opened this issue Apr 11, 2023 · 0 comments · Fixed by #1967
Assignees
Labels
enhancement New feature

Comments

@FerdinandSpitzschnueffler
Copy link
Contributor

Brief feature description

Sometimes it would be nice to access the underlying object of the Proxy object of a smart_lock, e.g. via the dereference operator.

concurrent::smart_lock<std::vector<int>> threadSafeVector;
...
auto guardedVector = threadSafeVector.getScopeGuard();
doSomethingWithVector(*guardedVector);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant