-
Notifications
You must be signed in to change notification settings - Fork 771
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -65,7 +65,7 @@ | |||||
\grammarterm{class-head} omits the | ||||||
\grammarterm{class-head-name} defines an \defnadj{unnamed}{class}. | ||||||
\begin{note} | ||||||
An unnamed class thus can't | ||||||
An unnamed class thus cannot | ||||||
be \tcode{final}. | ||||||
\end{note} | ||||||
Otherwise, the \grammarterm{class-name} is an \grammarterm{identifier}; | ||||||
|
@@ -1026,7 +1026,7 @@ | |||||
Programs shall not define implicitly-declared special member functions. | ||||||
|
||||||
\pnum | ||||||
Programs may explicitly refer to implicitly-declared special member functions. | ||||||
Programs can explicitly refer to implicitly-declared special member functions. | ||||||
\begin{example} | ||||||
A program may explicitly call or form a pointer to member | ||||||
to an implicitly-declared special member function. | ||||||
|
@@ -1299,7 +1299,7 @@ | |||||
\begin{note} | ||||||
An implicitly-declared default constructor has an | ||||||
exception specification\iref{except.spec}. | ||||||
An explicitly-defaulted definition might have an | ||||||
An explicitly-defaulted definition can have an | ||||||
implicit exception specification, see~\ref{dcl.fct.def}. | ||||||
\end{note} | ||||||
|
||||||
|
@@ -1502,7 +1502,7 @@ | |||||
|
||||||
\begin{note} | ||||||
When the move constructor is not implicitly declared or explicitly supplied, | ||||||
expressions that otherwise would have invoked the move constructor might instead invoke | ||||||
expressions that otherwise would have invoked the move constructor can instead invoke | ||||||
a copy constructor. | ||||||
\end{note} | ||||||
|
||||||
|
@@ -2111,7 +2111,7 @@ | |||||
\begin{note} | ||||||
A | ||||||
\tcode{return} | ||||||
statement\iref{stmt.return} in a destructor might not directly return to the | ||||||
statement\iref{stmt.return} in a destructor can not directly return to the | ||||||
caller; before transferring control to the caller, the destructors for the | ||||||
members and bases are called. | ||||||
\end{note} | ||||||
|
@@ -4053,7 +4053,7 @@ | |||||
\grammarterm{pure-specifier}\iref{class.mem} in the function declaration | ||||||
in the class definition. | ||||||
\begin{note} | ||||||
Such a function might be inherited: see below. | ||||||
Such a function can be inherited: see below. | ||||||
\end{note} | ||||||
A class is an \defnadj{abstract}{class} | ||||||
if it has at least one pure virtual function. | ||||||
|
@@ -4423,7 +4423,7 @@ | |||||
\begin{note} | ||||||
In a derived class, the lookup of a base class name will find the | ||||||
injected-class-name instead of the name of the base class in the scope | ||||||
in which it was declared. The injected-class-name might be less accessible | ||||||
in which it was declared. The injected-class-name can be less accessible | ||||||
than the name of the base class in the scope in which it was declared. | ||||||
\end{note} | ||||||
|
||||||
|
@@ -6033,7 +6033,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*} | ||||||
// but \tcode{D} is not constructed | ||||||
|
||||||
// ``\tcode{D((C*)this)}\!'' would be defined: \tcode{E*} $\rightarrow$ \tcode{C*} is defined because \tcode{E()} has started, | ||||||
|
@@ -6705,7 +6705,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 | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||||||
|
||||||
\item | ||||||
\tcode{x @ y} cannot be implicitly converted to \tcode{bool}. | ||||||
|
There was a problem hiding this comment.
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"?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.