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

Pre-increment on prvalues is not a requirement of WeaklyIncrementable #624

Open
ericniebler opened this issue Apr 26, 2019 · 1 comment
Open

Comments

@ericniebler
Copy link
Owner

See [iterator.concept.random.access]/2.6 and also the exposition-only Advanceable concept in iota_view.

Proposed Resolution

Change [iterator.concept.random.access]/2.6 as follows:

-(2.6) — If (a + D(n - 1)) is valid, then (a + n) is equal to ++(a + D(n - 1)).
+(2.6) — If (a + D(n - 1)) is valid, then (a + n) is equal to
+        [](I c){ return ++c; }(a + D(n - 1))`.

Make a similar change to [range.iota.view]/4.6.

@CaseyCarter
Copy link
Collaborator

The lambda's a bit nasty. It might be clearer to define another iterator c in the front matter, and use ++(c = (a + D(n - 1))).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants