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

[range.prim.size] rewords p1.3 to make it easier to parse #3565

Closed
wants to merge 2 commits into from
Closed

[range.prim.size] rewords p1.3 to make it easier to parse #3565

wants to merge 2 commits into from

Conversation

cjdb
Copy link
Contributor

@cjdb cjdb commented Dec 18, 2019

I expressed a desire to reword [range.prim.size] p1.3 on the LWG reflector, as I felt it is currently difficult to grasp the exact requirements (from an implementer's point-of-view). Hopefully this wording conveys the necessary requirements in a more concise manner.

Little feedback was given, so I'm unsure if this is something that should first go through a full review in Prague.

source/ranges.tex Outdated Show resolved Hide resolved
Copy link
Contributor

@CaseyCarter CaseyCarter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've reworded this paragraph so many times that I have no perspective anymore as to what's better or worse, but I can at least attest this change doesn't damage the paragraph (with @JohelEGP's suggested change).

Co-Authored-By: Johel Ernesto Guerrero Peña <johelegp@gmail.com>
Otherwise, \tcode{\placeholdernc{make-unsigned-like}(ranges::end(E) - ranges::begin(E))}\iref{ranges.syn}
if it is a valid expression, and
\tcode{T} models \tcode{forward_range}\iref{range.refinements}, and
\tcode{iterator_t<T>} and \tcode{sentinel_t<T>}\iref{ranges.syn} model
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No two cross-references to the same place within the same paragraph, please.

Otherwise, \tcode{\placeholdernc{make-unsigned-like}(ranges::end(E) - ranges::begin(E))}\iref{ranges.syn}
if it is a valid expression, and
\tcode{T} models \tcode{forward_range}\iref{range.refinements}, and
\tcode{iterator_t<T>} and \tcode{sentinel_t<T>}\iref{ranges.syn} model
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How editorially-obvious is it that iterator_t<T> and the type of ranges::begin(E) are actually the same type? For example, could ranges::begin(E) return an lvalue, which would make iterator_t<T> a reference? (i think the answer is "no", because weakly_incrementable requires default-constructible. And the answer is also "no" for the similar question regarding ranges::end(E), because semiregular also requires default-constructible. But it takes a few hops to get there.)

Copy link
Member

@jwakely jwakely Jun 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, they cannot return references. They either return a pointer, or decay-copy(something).

@zygoloid zygoloid added the needs rebase The pull request needs a git rebase to resolve merge conflicts. label Mar 12, 2020
@jensmaurer
Copy link
Member

Please rebase and force-push.

@tkoeppe tkoeppe added the changes requested Changes to the wording or approach have been requested and not yet applied. label Dec 14, 2020
@tkoeppe
Copy link
Contributor

tkoeppe commented Dec 14, 2020

@cjdb: Ping, are you still interested in this PR?

@tkoeppe tkoeppe closed this Jun 19, 2021
@tkoeppe tkoeppe deleted the branch cplusplus:master June 19, 2021 15:20
@tkoeppe
Copy link
Contributor

tkoeppe commented Jun 19, 2021

I'm not sure why this got closed; it wasn't meant to be.

@tkoeppe
Copy link
Contributor

tkoeppe commented Jun 19, 2021

@jensmaurer, @jwakely, @CaseyCarter: are you interested in taking this further? You can check out the last commit via git fetch origin pull/3565/head and create a new PR if you like.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changes requested Changes to the wording or approach have been requested and not yet applied. needs rebase The pull request needs a git rebase to resolve merge conflicts.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants