-
Notifications
You must be signed in to change notification settings - Fork 967
for_each_n
doc completed (#3933)
#3934
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
Conversation
@BrandonPacewic : Thanks for your contribution! The author(s) have been notified to review your proposed change. |
@BrandonPacewic : Thanks for your contribution! The author(s) have been notified to review your proposed change. |
@BrandonPacewic : Thanks for your contribution! The author(s) have been notified to review your proposed change. |
@BrandonPacewic : Thanks for your contribution! The author(s) have been notified to review your proposed change. |
@BrandonPacewic : Thanks for your contribution! The author(s) have been notified to review your proposed change. |
Can you review the proposed changes? IMPORTANT: When the changes are ready for publication, add a #label:"aq-pr-triaged" |
@@ -2191,7 +2191,7 @@ int main() | |||
|
|||
// The function object is templatized and so can be | |||
// used again on the elements with a different Factor | |||
for_each (v1.begin( ), v1.end( ), MultValue<int> (5 ) ); | |||
for_each ( v1.begin( ), v1.end( ), MultValue<int> ( 5 ) ); |
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.
Hi, our style is to not have the extra spacing between parens.
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.
@BrandonPacewic, thank you so much for seeing this hole and patching it up! Really appreciate you improving the docs.
I left some minor comments for you to consider.
An input iterator addressing the position of the first element in the range to be operated on. | ||
|
||
*`count`*\ | ||
A signed or unsigned integral type specifying the number of elements to be operated on. |
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 detail is correct but it may be more consumable to simply say 'The number of elements to operate on'
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.
(accidentally reviewing from my personal account sorry lol)
An iterator to the element that follows the last element processed if *`count`* > zero, | ||
otherwise the first element. |
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 unnecessarily confusing, imo; I would say something more like:
An iterator to the element that follows the last element processed if *`count`* > zero, | |
otherwise the first element. | |
The iterator after the last element processed. |
Co-authored-by: nicole mazzuca <[email protected]>
@BrandonPacewic : Thanks for your contribution! The author(s) have been notified to review your proposed change. |
Co-authored-by: nicole mazzuca <[email protected]>
@BrandonPacewic : Thanks for your contribution! The author(s) have been notified to review your proposed change. |
Example looks better now unless anyone has a problem with how I wrote the The wording I used for the params is almost identical to the |
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.
Hi Brandon,
Thank you for hanging in there on this. Thank you for the updates so far. I agree with the comment Stephan made about the lambdas. I'll watch for the update addressing that, and then we'll see if we can get this through.
Oh, regarding using the older documentation as a guide, yes, things have evolved. The difficulty is that we have hundreds of topics that are older than some of the people who come here to use them. We'd like to update them all, but simply don't have the resources. So, we go through what you are going through now, which is trying to make a little corner of the C++ docs better than it was before :-)
@BrandonPacewic : Thanks for your contribution! The author(s) have been notified to review your proposed change. |
@BrandonPacewic : Thanks for your contribution! The author(s) have been notified to review your proposed change. |
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.
@BrandonPacewic, thank you for making this contribution to the docs. I realize that you are doing it out of good will and on your own time. Thank you for improving this doc and participating in going back and forth with us on it.
@BrandonPacewic : Thanks for your contribution! The author(s) have been notified to review your proposed change. |
That's my last change I promise 😺 |
#sign-off |
I love working on these types of things. It is no burden for me to write back and forth. I sincerely appreciate everyone's willingness to work with me! ❤️ |
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.
Re-approving - getting a request to do so for some reason.
I made one more commit a few seconds after you approved the changes |
#sign-off |
@ShannonLeavitt : Thanks for your contribution! The author(s) have been notified to review your proposed change. |
Hey @BrandonPacewic , great work! |
Thanks! 😺 |
@BrandonPacewic , I sent you an e-mail a few minutes ago. Check your junk mail because it'll probably go there :-) |
This pr fixes #3933. Adding documentation for the STL algorithm
for_each_n
.