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.range] Requirement marked wrongly #2589

Closed
JohelEGP opened this issue Dec 10, 2018 · 4 comments
Closed

[range.range] Requirement marked wrongly #2589

JohelEGP opened this issue Dec 10, 2018 · 4 comments

Comments

@JohelEGP
Copy link
Contributor

ranges::begin(std::forward<T>(t)); // sometimes equality-preserving (see below)

should be marked with
``not required to be equality-preserving.'' An expression so annotated

@jensmaurer
Copy link
Member

The marking seems correct. p3.3 in the text that follows requires "equality-preserving" when the end result is a forward iterator.

@JohelEGP
Copy link
Contributor Author

Yeah, I'm aware. I'm just being pedantic because what I believe to be normative text requires marking

ranges::begin(std::forward<T>(t)); // sometimes equality-preserving (see below)

with // not required to be equality-preserving. p3.3 would then be an additional requirement for when it is required to be equality-preserving, which is the default.

@JohelEGP
Copy link
Contributor Author

p3.3 indeed adds the additional requirement, but http://eel.is/c++draft/concepts.equality#4 says that all are equality-preserving unless it uses this comment, and doesn't give leeway to waive the requirement some other way as usually done with the phrase "unless stated otherwise".

@JohelEGP
Copy link
Contributor Author

"sometimes equality-preserving" is true for all expressions "not required to be equality-preserving". Perhaps "conditionally required to be equality-preserving" is a better fit. This seems like LWG material. Should I open an issue?

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

No branches or pull requests

2 participants