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

[concepts.equality] Spurious "this document" wording #3980

Closed
Dani-Hub opened this issue May 4, 2020 · 3 comments · Fixed by #3984
Closed

[concepts.equality] Spurious "this document" wording #3980

Dani-Hub opened this issue May 4, 2020 · 3 comments · Fixed by #3984
Assignees

Comments

@Dani-Hub
Copy link
Member

Dani-Hub commented May 4, 2020

In [concepts.equality] there are several normative phrases referring to "this document" such as in p3, p4, and p5. This phrase is used to define the locality of the term equality preservation which again has impact on how requires-expression's are supposed to be interpreted. In theory "this document" can be interpreted in the widest possible form and could cover the complete International Standard (including core language). After a talk with Casey about the reason for this wording, he explained to me that this is a spurious left-over from the original Ranges-TS and is intended to cover the complete Standard Library specification. This issue is a modest attempt trying to ask whether "this document" in this [concepts.equality] subclause can be editorially changed to "throughout the library", or whether such a request would be non-editorially and would instead require an LWG issue.

@jensmaurer
Copy link
Member

jensmaurer commented May 4, 2020

[concepts.equality] p4 "Expressions declared in a requires-expression in this document are required to be equality-preserving, " seems to be the only case of the three mentioned ones where I can't squint the right way, and where a change is obviously normative looking at the wording verbatim.

But it's definitely strange to have such a requirement in a standard library section if it's supposed to apply to all core-language requires-expression s. @zygoloid , can we fix that under the "pellucidly obvious" doctrine? Is it important enough to backport to the C++20 DIS branch?

@CaseyCarter
Copy link
Contributor

Para 3 "Expressions required by this document to be equality-preserving are further required to be stable..." is correct as stated. I can't imagine why we would require an expression in the Core clauses to be equality-preserving, but if we did this should apply. Para 4 "Expressions declared in a requires-expression in this document are required to be equality-preserving..." and 5 "This document uses a notational convention to specify which expressions declared in a requires-expression modify which inputs..."are only intended to cover the library clauses. I don't think it's the end of the world if someone is confused into the belief that an expression in a requires-expression in an example in the Core section of the IS is required to be equality-preserving, so I'd say there's no need to port such a change to the C++20 DIS.

@zygoloid
Copy link
Member

zygoloid commented May 6, 2020

I think I can squint at the existing wording the right way: the core language wording itself doesn't declare [sic] any expressions in requires-expressions (at least, outside of examples), it only describes how requires-expressions could constrain expressions within a user program. However, the library wording does specify expressions within requires-expressions, and this rule therefore applies to those. Core language examples are non-normative, so changing whether they're equality-preserving is immaterial.

So I'm OK with fixing this editorially to say that it applies only within the library clauses. I think the intent and meaning is sufficiently clear. And because I think the intent and meaning is sufficiently clear (and that the wording is technically correct already) I'm inclined to not make this change for C++20 post-DIS.

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.

4 participants