-
Notifications
You must be signed in to change notification settings - Fork 441
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 post increment of counted iterator #1664
Fix post increment of counted iterator #1664
Conversation
The second CHECK fails
Working on a wider change in counted_iterator we want to propose (see P2406 for more details), we noticed this issue. |
@ericniebler I'd appreciate your feedback here. This is just adding one line + a simple test to demonstrate the bug/fix |
Apologies, running your tests now, but change looks good. |
Why are tests still pending? |
Seems like 16.04 isn't available there anymore? Tests running on 20.04 did run |
GitHub Actions : Ubuntu 16.04 LTS virtual environment will be removed on September 20, 2021 |
Fixing it with #1671 |
@ericniebler Tests passed now. Do you want me to rebase this branch on latest master or the merge is OK? |
When using conuted_iterator with an input iterator that has void-returning post increment operator, the post incrementing of counted_iterator doesn't decrement its counter.
This PR adds a test that demonstrates the issue and then adds the missing line to fix it.