Skip to content

Commit

Permalink
// OK; -> // OK: // error; -> // error:
Browse files Browse the repository at this point in the history
  • Loading branch information
vgvassilev committed Nov 11, 2016
1 parent cd7bd3e commit c3cc50b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion source/basic.tex
Original file line number Diff line number Diff line change
Expand Up @@ -3655,7 +3655,7 @@

X x;
void bar() {
xp = &x; // OK; type is ``pointer to \tcode{X}''
xp = &x; // OK: type is ``pointer to \tcode{X}''
arrp = &arr; // ill-formed: different types
xp++; // OK: \tcode{X} is complete
arrp++; // ill-formed: \tcode{UNKA} can't be completed
Expand Down
4 changes: 2 additions & 2 deletions source/declarators.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1948,7 +1948,7 @@
int a;
int mem1(int i = a); // error: non-static member \tcode{a}
// used as default argument
int mem2(int i = b); // OK; use \tcode{X::b}
int mem2(int i = b); // OK: use \tcode{X::b}
static int b;
};
\end{codeblock}
Expand Down Expand Up @@ -3857,7 +3857,7 @@
enum byte : unsigned char { };
byte b { 42 }; // OK
byte c = { 42 }; // error
byte d = byte{ 42 }; // OK; same value as \tcode{b}
byte d = byte{ 42 }; // OK: same value as \tcode{b}
byte e { -1 }; // error

struct A { byte b; };
Expand Down
6 changes: 3 additions & 3 deletions source/templates.tex
Original file line number Diff line number Diff line change
Expand Up @@ -7206,7 +7206,7 @@
};

using R = long;
using R = C<A<2>>::Q; // OK; \tcode{T} was deduced to \tcode{long} from the
using R = C<A<2>>::Q; // OK: \tcode{T} was deduced to \tcode{long} from the
// template argument value in the type \tcode{A<2>}
\end{codeblock}
\end{example}
Expand All @@ -7219,7 +7219,7 @@
};

using V = decltype(sizeof 0);
using V = S<int[42]>::Q; // OK; \tcode{T} was deduced to \tcode{std::size_t} from the type \tcode{int[42]}
using V = S<int[42]>::Q; // OK: \tcode{T} was deduced to \tcode{std::size_t} from the type \tcode{int[42]}
\end{codeblock}
\end{example}

Expand Down Expand Up @@ -7410,7 +7410,7 @@
Y<> y1; // use primary template; \tcode{Types} is empty
Y<int&, float&, double&> y2; // uses partial specialization; \tcode{T} is \tcode{int\&}, \tcode{Types} contains \tcode{float}, \tcode{double}
Y<int, float, double> y3; // uses primary template; \tcode{Types} contains \tcode{int}, \tcode{float}, \tcode{double}
int fv = f(g); // OK; \tcode{Types} contains \tcode{int}, \tcode{float}
int fv = f(g); // OK: \tcode{Types} contains \tcode{int}, \tcode{float}
\end{codeblock}

\end{example}
Expand Down
2 changes: 1 addition & 1 deletion source/utilities.tex
Original file line number Diff line number Diff line change
Expand Up @@ -5298,7 +5298,7 @@
const any y(cat); // \tcode{const y} holds \tcode{string}
assert(any_cast<const string&>(y) == cat);

any_cast<string&>(y); // error; cannot
any_cast<string&>(y); // error: cannot
// \tcode{any_cast} away const
\end{codeblock}
\end{example}
Expand Down

0 comments on commit c3cc50b

Please sign in to comment.