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

Replace post-increment and post-decrement boilerplate for iterators #4690

Open
jwakely opened this issue Jun 11, 2021 · 0 comments
Open

Replace post-increment and post-decrement boilerplate for iterators #4690

jwakely opened this issue Jun 11, 2021 · 0 comments
Labels
lwg Issue must be reviewed by LWG.

Comments

@jwakely
Copy link
Member

jwakely commented Jun 11, 2021

Many iterators defined in the library repeat the same wording:

Effects: Equivalent to:

auto tmp = *this;
++*this;
return tmp;

We should add front matter which says that when no detailed specification is present for operator++(int) it has the semantics shown above, and the equivalent with -- for operator--(int).

This would probably belong in [functions.within.classes].

This touches a lot of the library and should probably get checked by LWG, but still seems editorial to me.

@jwakely jwakely added the lwg Issue must be reviewed by LWG. label Jun 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lwg Issue must be reviewed by LWG.
Projects
None yet
Development

No branches or pull requests

1 participant