Skip to content

Commit 4fce03a

Browse files
committed
[except] Use \keyword throughout.
1 parent 251ee7a commit 4fce03a

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

source/exceptions.tex

+24-24
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@
2121
%
2222
\begin{bnf}
2323
\nontermdef{try-block}\br
24-
\terminal{try} compound-statement handler-seq
24+
\keyword{try} compound-statement handler-seq
2525
\end{bnf}
2626

2727
\indextext{\idxcode{try}}%
2828
%
2929
\begin{bnf}
3030
\nontermdef{function-try-block}\br
31-
\terminal{try} \opt{ctor-initializer} compound-statement handler-seq
31+
\keyword{try} \opt{ctor-initializer} compound-statement handler-seq
3232
\end{bnf}
3333

3434
\begin{bnf}
@@ -40,7 +40,7 @@
4040
%
4141
\begin{bnf}
4242
\nontermdef{handler}\br
43-
\terminal{catch} \terminal{(} exception-declaration \terminal{)} compound-statement
43+
\keyword{catch} \terminal{(} exception-declaration \terminal{)} compound-statement
4444
\end{bnf}
4545

4646
\begin{bnf}
@@ -101,11 +101,11 @@
101101
\indextext{\idxcode{return}!and handler}%
102102
\indextext{\idxcode{continue}!and handler}%
103103
A
104-
\tcode{goto},
105-
\tcode{break},
106-
\tcode{return},
104+
\keyword{goto},
105+
\keyword{break},
106+
\keyword{return},
107107
or
108-
\tcode{continue}
108+
\keyword{continue}
109109
statement can be used to transfer control out of
110110
a try block or handler.
111111
When this happens, each variable declared in the try block
@@ -197,7 +197,7 @@
197197
\grammarterm{throw-expression}{s}\iref{expr.throw},
198198
allocation functions\iref{basic.stc.dynamic.allocation},
199199
\keyword{dynamic_cast}\iref{expr.dynamic.cast},
200-
\tcode{typeid}\iref{expr.typeid},
200+
\keyword{typeid}\iref{expr.typeid},
201201
\grammarterm{new-expression}{s}\iref{expr.new}, and standard library
202202
functions\iref{structure.specifications}.
203203
\end{note}
@@ -210,8 +210,8 @@
210210
can be caught by a
211211
\grammarterm{handler}
212212
of
213-
\tcode{const}
214-
\tcode{char*}
213+
\keyword{const}
214+
\tcode{\keyword{char}*}
215215
type:
216216
\begin{codeblock}
217217
try {
@@ -252,7 +252,7 @@
252252
\grammarterm{compound-statement} or
253253
\grammarterm{ctor-initializer}
254254
following the
255-
\tcode{try}
255+
\keyword{try}
256256
keyword was most recently entered by the thread of control and not yet exited.
257257

258258
\pnum
@@ -266,7 +266,7 @@
266266
If the type of the exception object would be
267267
an incomplete type,
268268
an abstract class type\iref{class.abstract},
269-
or a pointer to an incomplete type other than \cv{}~\tcode{void}
269+
or a pointer to an incomplete type other than \cv{}~\keyword{void}
270270
the program is ill-formed.
271271

272272
\pnum
@@ -377,7 +377,7 @@
377377
constructed, but not yet destroyed,
378378
since the try block was entered.
379379
If an exception is thrown during the destruction of temporaries or
380-
local variables for a \tcode{return} statement\iref{stmt.return},
380+
local variables for a \keyword{return} statement\iref{stmt.return},
381381
the destructor for the returned object (if any) is also invoked.
382382
The objects are destroyed in the reverse order of the completion
383383
of their construction.
@@ -468,7 +468,7 @@
468468
The
469469
\grammarterm{exception-declaration}
470470
shall not denote a pointer or reference to an
471-
incomplete type, other than ``pointer to \cv{}~\tcode{void}''.
471+
incomplete type, other than ``pointer to \cv{}~\keyword{void}''.
472472

473473
\pnum
474474
A handler of type
@@ -631,7 +631,7 @@
631631
on the initial function of the thread.
632632

633633
\pnum
634-
If a \tcode{return} statement\iref{stmt.return} appears in a handler of the
634+
If a \keyword{return} statement\iref{stmt.return} appears in a handler of the
635635
\grammarterm{function-try-block}
636636
of a
637637
constructor, the program is ill-formed.
@@ -697,25 +697,25 @@
697697

698698
\begin{bnf}
699699
\nontermdef{noexcept-specifier}\br
700-
\terminal{noexcept} \terminal{(} constant-expression \terminal{)}\br
701-
\terminal{noexcept}\br
700+
\keyword{noexcept} \terminal{(} constant-expression \terminal{)}\br
701+
\keyword{noexcept}\br
702702
\end{bnf}
703703

704704
\pnum
705705
\indextext{exception specification!noexcept!constant expression and}%
706706
In a \grammarterm{noexcept-specifier}, the \grammarterm{constant-expression},
707707
if supplied, shall be a contextually converted constant expression
708-
of type \tcode{bool}\iref{expr.const};
708+
of type \keyword{bool}\iref{expr.const};
709709
that constant expression is the exception specification of
710710
the function type in which the \grammarterm{noexcept-specifier} appears.
711-
A \tcode{(} token that follows \tcode{noexcept} is part of the
711+
A \tcode{(} token that follows \keyword{noexcept} is part of the
712712
\grammarterm{noexcept-specifier} and does not commence an
713713
initializer\iref{dcl.init}.
714-
The \grammarterm{noexcept-specifier} \tcode{noexcept}
714+
The \grammarterm{noexcept-specifier} \keyword{noexcept}
715715
without a \grammarterm{constant-expression}
716716
is
717717
equivalent to the \grammarterm{noexcept-specifier}
718-
\tcode{noexcept(true)}.
718+
\tcode{\keyword{noexcept}(\keyword{true})}.
719719

720720
\pnum
721721
If a declaration of a function
@@ -827,7 +827,7 @@
827827
requires a runtime check\iref{expr.dynamic.cast},
828828
or
829829
\item
830-
$E$ is a \tcode{typeid} expression applied to a
830+
$E$ is a \keyword{typeid} expression applied to a
831831
(possibly parenthesized) built-in unary \tcode{*} operator
832832
applied to a pointer to a
833833
polymorphic class type\iref{expr.typeid},
@@ -909,14 +909,14 @@
909909
};
910910
struct B {
911911
B() noexcept;
912-
B(const B&) = default; // implicit exception specification is \tcode{noexcept(true)}
912+
B(const B&) = default; // implicit exception specification is \tcode{\keyword{noexcept}(\keyword{true})}
913913
B(B&&, int = (throw 42, 0)) noexcept;
914914
~B() noexcept(false);
915915
};
916916
int n = 7;
917917
struct D : public A, public B {
918918
int * p = new int[n];
919-
// \tcode{D::D()} potentially-throwing, as the \tcode{new} operator may throw \tcode{bad_alloc} or \tcode{bad_array_new_length}
919+
// \tcode{D::D()} potentially-throwing, as the \keyword{new} operator may throw \tcode{bad_alloc} or \tcode{bad_array_new_length}
920920
// \tcode{D::D(const D\&)} non-throwing
921921
// \tcode{D::D(D\&\&)} potentially-throwing, as the default argument for \tcode{B}'s constructor may throw
922922
// \tcode{D::\~D()} potentially-throwing

0 commit comments

Comments
 (0)