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.requirements.general] past-the-end/dereferenceable/singular iterators are not defined #2632

Closed
morinmorin opened this issue Jan 1, 2019 · 6 comments · Fixed by #3593
Assignees

Comments

@morinmorin
Copy link
Contributor

morinmorin commented Jan 1, 2019

Past-the-end/dereferenceable/singular values are defined in [iterator.requirements.general] p7, but past-the-end/dereferenceable/singular iterators are not defined.
Would it be better to have "iterators having XXXX values are called XXXX"?

Edit: The problem is that these adjectives for iterators are used without definition. For example,

  • [vector.capacity] p11: … as well as the past-the-end iterator.
  • [iterator.requirements.general] p11: … i is dereferenceable.
  • [iterator.requirements.general] p15: … an iterator that may be singular.
@jensmaurer jensmaurer added the decision-required A decision of the editorial group (or the Project Editor) is required. label Jan 2, 2019
@jensmaurer
Copy link
Member

Is this editorial?

@CaseyCarter
Copy link
Contributor

I don't see this as problematic: it's conventional with value-semantic object types to refer to objects as having properties when we actually mean that the value of the object has that property. Given:

int i = 42;

I think the statement "i is even" clearly conveys the meaning "i has the value 42 which is even."

@morinmorin
Copy link
Contributor Author

I thought that defining

  • past-the-end iterators
  • dereferenceable iterators
  • singular iterators

and putting them in the index may improve the readability of the Standard.

@CaseyCarter
Copy link
Contributor

All three terms are defined for iterator values in [iterator.requirements.general]/7, although not properly indexed. Would it suffice to index those terms?

@morinmorin
Copy link
Contributor Author

morinmorin commented Jan 6, 2019

Would it suffice to index those terms?

Yes, that works.

  • While the term "invalid pointer value" has the two index entries,

    • invalid pointer value
    • value -> invalid pointer

    I think it is more useful if the term "xxxx iterator value" has the following index entries

    • xxxx iterator value
    • iterator -> xxxx iterator value (instead of value -> …)
  • In the Standard (unlike the SGI doc), singular iterator values are only used in "22.3 Iterator Requirements". Thus, since the term "singular iterator value" meets this,

    As a rule of thumb, if a term is local to a subclause, do not make it italics and do not index it

    it seems better not to index it.

@jensmaurer jensmaurer removed the decision-required A decision of the editorial group (or the Project Editor) is required. label Jun 5, 2019
@jensmaurer
Copy link
Member

The linked pull request will consistently use "xxxx iterator" in the index, not "xxxx iterator value", following the argument of @CaseyCarter. However, the actual definitions are not changed.

@jensmaurer jensmaurer self-assigned this Jan 11, 2020
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.

3 participants