-
Notifications
You must be signed in to change notification settings - Fork 12
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
Adding RwLock inplace initialization #79
base: master
Are you sure you want to change the base?
Conversation
No, instead |
@Araq checked out |
Related: #75 |
Checked out the discussion in #75. Still don't understand how |
By the way, perhaps the compiler could be patched so that in constructions like
or
the special |
That is what I mean with |
I have a following toy example
This doesn't compile (
@Araq what am I doing wrong here? |
We need to teach the compiler new tricks first. :-) |
Right now an object with an
RwLock
field can't be properly initialized (myobj.rwLock = createRwLock()
fails due to a deleted move constructor). This PR addresses this by introducing an in-place initializer (init(myobj.rwLock)
).