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

LWG Poll 13: P1994R1 elements_view needs its own sentinel #3754

Merged
merged 2 commits into from Feb 29, 2020

Conversation

burblebee
Copy link
Contributor

@burblebee burblebee commented Feb 19, 2020

Also fixes LWG3386.

Fixes #3715.
Fixes cplusplus/papers#717.

Notes/Issues:

  • [range.elements.sentinel] Should \exposid{Base} be \exposid{base-t} as it is in [range.elements.iterator]? We're inconsistent wrt Base v. base-t elsewhere as well. There are also other differences between sentinel and iterator, like "other" and "base() const" (no ref) - I assume these are intentional?

@CaseyCarter
Copy link
Contributor

CaseyCarter commented Feb 19, 2020

  • [range.elements.sentinel] Should \exposid{Base} be \exposid{base-t} as it is in [range.elements.iterator]? We're inconsistent wrt Base v. base-t elsewhere as well.

Per #3561, both should be \exposid{Base}.

There are also other differences between sentinel and iterator, like "other" and "base() const" (no ref) - I assume these are intentional?

Yes they are: iterator may adapt a move-only iterator, but sentinels are always semiregular and therefore copyable.

source/ranges.tex Outdated Show resolved Hide resolved
source/ranges.tex Show resolved Hide resolved
source/ranges.tex Outdated Show resolved Hide resolved
@jensmaurer jensmaurer added this to the post-2020-02 milestone Feb 21, 2020
@jensmaurer jensmaurer changed the title P1994R1 elements_view needs its own sentinel LWG Poll 13: P1994R1 elements_view needs its own sentinel Feb 21, 2020
source/ranges.tex Outdated Show resolved Hide resolved
@zygoloid zygoloid merged commit c091aa5 into master Feb 29, 2020
@jensmaurer jensmaurer deleted the motions-2020-02-lwg-13 branch February 12, 2021 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants