Skip to content

Commit 53a958b

Browse files
committed
Rebase and address zygoloid's comments.
Revert some of the mechanical * OK: back to OK, * ill-formed, no diagnostic required back to ill-formed, no diagnostic required * error: -> error, (in one case).
1 parent 131071c commit 53a958b

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

source/access.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -840,14 +840,14 @@
840840
class Y;
841841
extern void b();
842842
class A {
843-
friend class X; // OK: but \tcode{X} is a local class, not \tcode{::X}
843+
friend class X; // OK, but \tcode{X} is a local class, not \tcode{::X}
844844
friend class Y; // OK
845845
friend class Z; // OK: introduces local class \tcode{Z}
846846
friend void a(); // error: \tcode{::a} is not considered
847847
friend void b(); // OK
848848
friend void c(); // error
849849
};
850-
X* px; // OK: but \tcode{::X} is found
850+
X* px; // OK, but \tcode{::X} is found
851851
Z* pz; // error: no \tcode{Z} is found
852852
}
853853
\end{codeblock}

source/basic.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -929,7 +929,7 @@
929929

930930
typedef int I;
931931
class D {
932-
typedef I I; // error: even though no reordering involved
932+
typedef I I; // error, even though no reordering involved
933933
};
934934
\end{codeblock}
935935
\end{example}

source/declarations.tex

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@
154154

155155
\begin{codeblock}
156156
enum { }; // ill-formed
157-
typedef class { }; // ill-formed
157+
typedef class { }; // ill-formed
158158
\end{codeblock}
159159
\end{example}
160160

@@ -906,7 +906,7 @@
906906
\begin{codeblock}
907907
constexpr int f(bool b)
908908
{ return b ? throw 0 : 0; } // OK
909-
constexpr int f() { return f(true); } // ill-formed: no diagnostic required
909+
constexpr int f() { return f(true); } // ill-formed, no diagnostic required
910910

911911
struct B {
912912
constexpr B(int x) : i(0) { } // \tcode{x} is unused
@@ -916,7 +916,7 @@
916916
int global;
917917

918918
struct D : B {
919-
constexpr D() : B(global) { } // ill-formed: no diagnostic required
919+
constexpr D() : B(global) { } // ill-formed, no diagnostic required
920920
// lvalue-to-rvalue conversion on non-constant \tcode{global}
921921
};
922922
\end{codeblock}
@@ -1677,7 +1677,7 @@
16771677
body.
16781678
\begin{example}
16791679
\begin{codeblock}
1680-
auto f() { } // OK: return type is \tcode{void}
1680+
auto f() { } // OK, return type is \tcode{void}
16811681
auto* g() { } // error: cannot deduce \tcode{auto*} from \tcode{void()}
16821682
\end{codeblock}
16831683
\end{example}
@@ -1733,7 +1733,7 @@
17331733
decltype(auto) f(); // error: \tcode{auto} and \tcode{decltype(auto)} don't match
17341734

17351735
template <typename T> auto g(T t) { return t; } // \#1
1736-
template auto g(int); // OK: return type is \tcode{int}
1736+
template auto g(int); // OK, return type is \tcode{int}
17371737
template char g(char); // error: no matching template
17381738
template<> auto g(double); // OK: forward declaration with unknown return type
17391739

source/declarators.tex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@
620620
or allow it to be changed through a cv-unqualified pointer later, for example:
621621

622622
\begin{codeblock}
623-
*ppc = &ci; // OK: but would make \tcode{p} point to \tcode{ci} ...
623+
*ppc = &ci; // OK, but would make \tcode{p} point to \tcode{ci} ...
624624
// ... because of previous error
625625
*p = 5; // clobber \tcode{ci}
626626
\end{codeblock}
@@ -2268,7 +2268,7 @@
22682268

22692269
\begin{codeblock}
22702270
struct onlydouble {
2271-
onlydouble() = delete; // OK: but redundant
2271+
onlydouble() = delete; // OK, but redundant
22722272
onlydouble(std::intmax_t) = delete;
22732273
onlydouble(double);
22742274
};
@@ -2734,7 +2734,7 @@
27342734
\begin{codeblock}
27352735
int f(bool b) {
27362736
unsigned char c;
2737-
unsigned char d = c; // OK: \tcode{d} has an indeterminate value
2737+
unsigned char d = c; // OK, \tcode{d} has an indeterminate value
27382738
int e = d; // undefined behavior
27392739
return b ? d : 0; // undefined behavior if \tcode{b} is \tcode{true}
27402740
}

0 commit comments

Comments
 (0)