Skip to content

Fix forbidden words in notes and examples #7039

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jensmaurer
Copy link
Member

@jensmaurer jensmaurer commented May 23, 2024

Fixes ISO/CS comment (C++23 proof)

Carefully select each hunk when / if applying to the Working Draft.

@jensmaurer jensmaurer added the ballot-comment Response to an NB or ISO comment on a ballot label May 23, 2024
@jensmaurer jensmaurer added this to the C++23 milestone May 23, 2024
@@ -6030,7 +6030,7 @@
struct X { X(A*); };

struct E : C, D, X {
E() : D(this), // undefined behavior: upcast from \tcode{E*} to \tcode{A*} might use path \tcode{E*} $\rightarrow$ \tcode{D*} $\rightarrow$ \tcode{A*}
E() : D(this), // undefined behavior: upcast from \tcode{E*} to \tcode{A*} can use path \tcode{E*} $\rightarrow$ \tcode{D*} $\rightarrow$ \tcode{A*}
Copy link
Member

Choose a reason for hiding this comment

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

Would this one be better as "could"?

Copy link
Member Author

Choose a reason for hiding this comment

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

ISO doesn't like "could" in notes and examples, I think.

Copy link
Contributor

Choose a reason for hiding this comment

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

It's actually a bit more subtle than that: The verbal forms for provisions are strictly controlled. But if we're not expressing a provision, then there's in principle no restriction. What ISO/CS is worried about then is that one might mistakenly misunderstand something to be a provision (even though it's not meant to be one), and they then recommend rephrasing it so that such a misunderstanding can't happen.

We can belabor this separately for the WD, but for the IS I'd be OK to accept a somewhat crude replacement.

@@ -6702,7 +6702,7 @@
the expression resulting from the interpretation of \tcode{x @ y}
using the selected rewritten candidate\iref{over.match.oper}
does not result in a usable candidate
(for example, that expression might be \tcode{(x <=> y) @ 0}), or
(for example, that expression can be \tcode{(x <=> y) @ 0}), or
Copy link
Member

Choose a reason for hiding this comment

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

I'm not really sure I correctly understand what this \item is even saying, so I don't think the parenthetical example helps me.

Would this be clearer?

Suggested change
(for example, that expression can be \tcode{(x <=> y) @ 0}), or
(for example, when the resulting expression is \tcode{(x <=> y) @ 0}), or

Copy link
Member Author

Choose a reason for hiding this comment

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

No, that's not what we want to say. Your rewrite sounds like it's an example for "does not result in a usable candidate". The original phrasing just wants to give an example for the "expression resulting from the interpretation ... using the rewritten candidate". The rewritten candidate might be <=>.

Within the confines of what we can use, "can" is as good as we get here, I think.

@@ -546,7 +546,7 @@
after inclusion of any member of the set of library headers
indicated in the corresponding comment in this synopsis.
\begin{note}
Future revisions of \Cpp{} might replace
Future revisions of \Cpp{} can replace
Copy link
Member

Choose a reason for hiding this comment

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

"It is not guaranteed that future revisions of C++ will not replace the values ..."?

Copy link
Member Author

Choose a reason for hiding this comment

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

No. We want to say / handwave that the values will never become smaller. Your rephrasing loses that.

@jensmaurer
Copy link
Member Author

Maybe I should have said that this is for the IS only, and I have no trouble killing English grammar or C++ semantics there.

@jwakely
Copy link
Member

jwakely commented May 24, 2024

Understood, but I'd prefer not to get defects reported because the IS says things are impossible when it intends to say they might not happen. Oh well, they're mostly just notes anyway.

@tkoeppe
Copy link
Contributor

tkoeppe commented Jul 10, 2024

This is great, thank you! I will pull these two commits into the IS only. As before, I'd like to consider for each change whether it's actually an improvement, and if so, we'll also apply it to the WD. (But this can happen asynchronously.)

@wg21bot wg21bot added the needs rebase The pull request needs a git rebase to resolve merge conflicts. label Oct 16, 2024
@jensmaurer jensmaurer modified the milestones: C++23, C++26 Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ballot-comment Response to an NB or ISO comment on a ballot 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.

4 participants