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
Fix Issue 18036 - Documentation of moveFront() #8393
Conversation
Thanks for your pull request and interest in making D better, @pbackus! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla references
Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + phobos#8393" |
Thank you! Looks good to me but I don't think I can approve. (?) |
std/range/primitives.d
Outdated
Moves the front of `r` out and returns it. | ||
|
||
If `r.front` is a struct with a destructor or postblit defined, it is reset |
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.
This is slightly confusing as is because it uses "it" for both r.front
(as it lives in the range r
) and the returned/moved value.
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 think that we should mention the copy constructor here instead of the postblit.
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 think that we should mention the copy constructor here instead of the postblit.
Yes, the documentation for core.lifetime.move
is itself outdated too in that regard.
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.
Changed to "copy constructor" and tried to clarify the wording a bit.
...fails to mention different behavior depending on hasElaborateCopyConstructor The new wording is based on the documentation for core.lifetime.move.
...fails to mention different behavior depending on
hasElaborateCopyConstructor
The new wording is based on the documentation for core.lifetime.move.