-
-
Notifications
You must be signed in to change notification settings - Fork 368
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 move constructor documentation #4154
Conversation
Thanks for your pull request, @WalterBright! Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. |
constructors make a copy of the original, while move constructors move the contents of | ||
the original, and the lifetime of the original ends.) | ||
|
||
$(NOTE Do not use postblits in the same struct with move constructors.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we have to have a warning like this, we should probably not support it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I plan on investigating if postblits should be allowed if there are move constructors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What I'm wondering here is perhaps we have been thinking about postblit a bit wrong.
Instead of it being the third hook, make it the common denominator of both copy/move constructors. So it is always called after they are.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The rationale behind postblit was as another way to do a move constructor, not an enhancement to move constructors.
4765742
to
ca1fb56
Compare
621381d
to
5ac133d
Compare
5ac133d
to
6896d09
Compare
ready to pull |
As promised.