Skip to content

Commit d18f666

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 8678945 commit d18f666

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
@@ -940,7 +940,7 @@
940940

941941
typedef int I;
942942
class D {
943-
typedef I I; // error: even though no reordering involved
943+
typedef I I; // error, even though no reordering involved
944944
};
945945
\end{codeblock}
946946
\end{example}

source/declarations.tex

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

156156
\begin{codeblock}
157157
enum { }; // ill-formed
158-
typedef class { }; // ill-formed
158+
typedef class { }; // ill-formed
159159
\end{codeblock}
160160
\end{example}
161161

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

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

917917
struct D : B {
918-
constexpr D() : B(global) { } // ill-formed: no diagnostic required
918+
constexpr D() : B(global) { } // ill-formed, no diagnostic required
919919
// lvalue-to-rvalue conversion on non-constant \tcode{global}
920920
};
921921
\end{codeblock}
@@ -1680,7 +1680,7 @@
16801680
body.
16811681
\begin{example}
16821682
\begin{codeblock}
1683-
auto f() { } // OK: return type is \tcode{void}
1683+
auto f() { } // OK, return type is \tcode{void}
16841684
auto* g() { } // error: cannot deduce \tcode{auto*} from \tcode{void()}
16851685
\end{codeblock}
16861686
\end{example}
@@ -1736,7 +1736,7 @@
17361736
decltype(auto) f(); // error: \tcode{auto} and \tcode{decltype(auto)} don't match
17371737

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

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}
@@ -2271,7 +2271,7 @@
22712271

22722272
\begin{codeblock}
22732273
struct onlydouble {
2274-
onlydouble() = delete; // OK: but redundant
2274+
onlydouble() = delete; // OK, but redundant
22752275
onlydouble(std::intmax_t) = delete;
22762276
onlydouble(double);
22772277
};
@@ -2711,7 +2711,7 @@
27112711
\begin{codeblock}
27122712
int f(bool b) {
27132713
unsigned char c;
2714-
unsigned char d = c; // OK: \tcode{d} has an indeterminate value
2714+
unsigned char d = c; // OK, \tcode{d} has an indeterminate value
27152715
int e = d; // undefined behavior
27162716
return b ? d : 0; // undefined behavior if \tcode{b} is \tcode{true}
27172717
}

0 commit comments

Comments
 (0)