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

[iterator.concept.winc] I used to represent both an integer-class and weakly_incrementable type #4472

Open
JohelEGP opened this issue Jan 24, 2021 · 3 comments · May be fixed by #4487
Open
Assignees

Comments

@JohelEGP
Copy link
Contributor

The first 2 exposition-only concepts, is-integer-like and is-signed-integer-like, have a template parameter named T.

Then comes the weakly_incrementable concept, with a template parameter named I.

The following normative paragraphs use I to define "integer-class", a subset of the T above. They rightfully reintroduce I each time, although the first one is unused.

Then, the final normative paragraph (before the Note: and Recommended practice:) uses I again, but this time to describe weakly_incrementable.

I is widely used throughout [iterator] to represent iterators. I believe those describing integer-class types should be renamed to T. This would be consistent with the is-integer-like concept.

Related: #3457.

@JohelEGP
Copy link
Contributor Author

Editorial meeting: Concepts are predicates. The name should not presuppose the outcome of the check. Thus, use "T" in concept definitions.

After this is applied, or even before, weakly_incrementable could be moved closer to the paragraph describing it. This would leave the definition of integer-class type together with its concepts. Perhaps they could even be moved to their own subclause, as they're used elsewhere. Then there'd be less space for confusion.

@JohelEGP
Copy link
Contributor Author

FWIW, decrementable and advanceable in [range.iota.view] use I.

@jensmaurer
Copy link
Member

Renamed integer type placeholder to "T"; moved concept definition for weakly_incrementable to immediately before the "models" wording.

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

Successfully merging a pull request may close this issue.

2 participants