Skip to content

Commit d09235c

Browse files
committed
[basic.start,except] Harmonize references to std::terminate
1 parent 75c9148 commit d09235c

File tree

4 files changed

+31
-30
lines changed

4 files changed

+31
-30
lines changed

source/basic.tex

+5-4
Original file line numberDiff line numberDiff line change
@@ -5512,9 +5512,10 @@
55125512
in which threads and at which points in the program such deferred dynamic initialization occurs.
55135513

55145514
\pnum
5515-
If the initialization of a non-local variable with static or thread storage duration
5516-
exits via
5517-
an exception, \tcode{std::terminate} is called\iref{except.terminate}.%
5515+
If the initialization of
5516+
a non-local variable with static or thread storage duration
5517+
exits via an exception,
5518+
the function \tcode{std::terminate} is called\iref{except.terminate}.%
55185519
\indextext{program!start|)}
55195520

55205521
\rSec3[basic.start.term]{Termination}
@@ -5560,7 +5561,7 @@
55605561
of the subobjects is destroyed.
55615562
If the destruction of an object with static or thread storage duration
55625563
exits via an exception,
5563-
\tcode{std::terminate} is called\iref{except.terminate}.
5564+
the function \tcode{std::terminate} is called\iref{except.terminate}.
55645565

55655566
\pnum
55665567
If a function contains a block-scope object of static or thread storage duration that has been

source/declarations.tex

+3-3
Original file line numberDiff line numberDiff line change
@@ -4041,7 +4041,7 @@
40414041
are modifications of non-volatile objects
40424042
whose lifetime began and ended within the evaluation of the predicate.
40434043
An evaluation of a predicate that exits via an exception
4044-
invokes \tcode{std::terminate()}\iref{except.terminate}.
4044+
invokes the function \tcode{std::terminate}\iref{except.terminate}.
40454045
The behavior of any other side effect is undefined.
40464046
\begin{example}
40474047
\begin{codeblock}
@@ -4340,7 +4340,7 @@
43404340
with a non-throwing exception specification,
43414341
then the behavior is as if the exception escaped the function body.
43424342
\begin{note}
4343-
The function \tcode{std::terminate()} is invoked\iref{except.terminate}.
4343+
The function \tcode{std::terminate} is invoked\iref{except.terminate}.
43444344
\end{note}
43454345
\begin{example}
43464346
\begin{codeblock}
@@ -4359,7 +4359,7 @@
43594359
\term{off} or \term{on}.
43604360
A translation with violation continuation mode set to \term{off}
43614361
terminates execution
4362-
by invoking \tcode{std::terminate()}\iref{except.terminate}
4362+
by invoking the function \tcode{std::terminate}\iref{except.terminate}
43634363
after completing the execution of the violation handler.
43644364
A translation with a violation continuation mode set to \term{on}
43654365
continues execution after completing the execution of the violation handler.

source/exceptions.tex

+18-18
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@
330330
If the exception handling mechanism
331331
handling an uncaught exception\iref{except.uncaught}
332332
directly invokes a function that exits via an
333-
exception, \tcode{std::terminate} is called\iref{except.terminate}.
333+
exception, the function \tcode{std::terminate} is called\iref{except.terminate}.
334334
\begin{example}
335335
\begin{codeblock}
336336
struct C {
@@ -344,7 +344,7 @@
344344

345345
int main() {
346346
try {
347-
throw C(); // calls \tcode{std::terminate()} if construction of the handler's
347+
throw C(); // calls \tcode{std::terminate} if construction of the handler's
348348
// \grammarterm{exception-declaration} object is not elided\iref{class.copy}
349349
} catch(C) { }
350350
}
@@ -595,7 +595,7 @@
595595
The stack will have been unwound at that point.
596596
\end{note}
597597
Also, an implicit handler is considered active when
598-
\tcode{std::terminate()}
598+
the function \tcode{std::terminate}
599599
is entered due to a throw. A handler is no longer considered active when the
600600
catch clause exits.
601601

@@ -608,12 +608,12 @@
608608
\pnum
609609
If no matching handler is found,
610610
the function
611-
\tcode{std::terminate()}
611+
\tcode{std::terminate}
612612
is called;
613613
whether or not the stack is unwound before this call to
614-
\tcode{std::terminate()}
614+
\tcode{std::terminate}
615615
is \impldef{stack unwinding before call to
616-
\tcode{std::terminate()}}\iref{except.terminate}.
616+
\tcode{std::terminate}}\iref{except.terminate}.
617617

618618
\pnum
619619
Referring to any non-static member or base class of an object
@@ -785,7 +785,7 @@
785785
and the search for a handler\iref{except.handle}
786786
encounters the outermost block of a function with a
787787
non-throwing exception specification,
788-
the function \tcode{std::terminate()} is called\iref{except.terminate}.
788+
the function \tcode{std::terminate} is called\iref{except.terminate}.
789789
\begin{note}
790790
An implementation shall not reject an expression merely because, when
791791
executed, it throws or might
@@ -872,7 +872,7 @@
872872
their exception specifications do not contribute
873873
to the exception specification of the constructor,
874874
because an exception thrown from such a destructor
875-
would call \tcode{std::terminate}
875+
would call the function \tcode{std::terminate}
876876
rather than escape the constructor~(\ref{except.throw}, \ref{except.terminate}).
877877
\end{note}
878878

@@ -976,15 +976,15 @@
976976
\rSec1[except.special]{Special functions}
977977

978978
\pnum
979-
The function \tcode{std::terminate()}\iref{except.terminate}
979+
The function \tcode{std::terminate}\iref{except.terminate}
980980
is used by the exception
981981
handling mechanism for coping with errors related to the exception handling
982982
mechanism itself. The function
983983
\tcode{std::current_exception()}\iref{propagation} and the class
984984
\tcode{std::nested_exception}\iref{except.nested} can be used by a program to
985985
capture the currently handled exception.
986986

987-
\rSec2[except.terminate]{The \tcode{std::terminate()} function}
987+
\rSec2[except.terminate]{The \tcode{std::terminate} function}
988988

989989
\pnum
990990
\indextext{\idxcode{terminate}}%
@@ -1076,29 +1076,29 @@
10761076
\pnum
10771077
\indextext{\idxcode{terminate}}%
10781078
In such cases,
1079-
\tcode{std::terminate()}
1079+
the function \tcode{std::terminate}
10801080
is called\iref{exception.terminate}.
10811081
In the situation where no matching handler is found, it is
1082-
\impldef{stack unwinding before call to \tcode{std::terminate()}} whether or not the
1082+
\impldef{stack unwinding before call to \tcode{std::terminate}} whether or not the
10831083
stack is unwound
10841084
before
1085-
\tcode{std::terminate()}
1085+
\tcode{std::terminate}
10861086
is called.
10871087
In the situation where the search for a handler\iref{except.handle} encounters the
10881088
outermost block of a function
10891089
with a non-throwing exception specification\iref{except.spec}, it is
1090-
\impldef{whether stack is unwound before calling \tcode{std::ter\-mi\-nate()}
1090+
\impldef{whether stack is unwound before calling the function \tcode{std::terminate}
10911091
when a \tcode{noexcept} specification
10921092
is violated}
10931093
whether the stack is unwound, unwound partially, or not unwound at all
1094-
before \tcode{std::terminate()} is called.
1094+
before the function \tcode{std::terminate} is called.
10951095
In all other situations, the stack shall not be unwound before
1096-
\tcode{std::terminate()}
1096+
the function \tcode{std::terminate}
10971097
is called.
10981098
An implementation is not permitted to finish stack unwinding
10991099
prematurely based on a determination that the unwind process
1100-
will eventually cause a call to
1101-
\tcode{std::terminate()}.
1100+
will eventually cause a call to the function
1101+
\tcode{std::terminate}.
11021102

11031103
\rSec2[except.uncaught]{The \tcode{std::uncaught_exceptions()} function}%
11041104
\indexlibrary{\idxcode{uncaught_exceptions}}

source/support.tex

+5-5
Original file line numberDiff line numberDiff line change
@@ -1885,7 +1885,7 @@
18851885
\tcode{main}.}
18861886

18871887
If control leaves a registered function called by \tcode{exit} because the function does
1888-
not provide a handler for a thrown exception, \tcode{std::terminate()} shall be called\iref{except.terminate}.%
1888+
not provide a handler for a thrown exception, the function \tcode{std::terminate} shall be called\iref{except.terminate}.%
18891889
\indexlibrary{\idxcode{terminate}}%
18901890

18911891
\item
@@ -1962,7 +1962,7 @@
19621962
previously registered functions that had already been called at the time it was
19631963
registered. Objects shall not be destroyed as a result of calling \tcode{quick_exit}.
19641964
If control leaves a registered function called by \tcode{quick_exit} because the
1965-
function does not provide a handler for a thrown exception, \tcode{std::terminate()} shall
1965+
function does not provide a handler for a thrown exception, the function \tcode{std::terminate} shall
19661966
be called.\indexlibrary{\idxcode{terminate}}
19671967
\begin{note}
19681968
A function registered via \tcode{at_quick_exit}
@@ -3645,8 +3645,8 @@
36453645
\pnum
36463646
\remarks
36473647
When \tcode{uncaught_exceptions() > 0},
3648-
throwing an exception can result in a call of\\
3649-
\tcode{std::terminate()}\iref{except.terminate}.
3648+
throwing an exception can result in a call of the function
3649+
\tcode{std::terminate}\iref{except.terminate}.
36503650
\end{itemdescr}
36513651

36523652
\rSec2[propagation]{Exception propagation}
@@ -3801,7 +3801,7 @@
38013801

38023802
\begin{itemdescr}
38033803
\pnum
3804-
\effects If \tcode{nested_ptr()} returns a null pointer, the function calls \tcode{std::terminate()}.
3804+
\effects If \tcode{nested_ptr()} returns a null pointer, the function calls the function \tcode{std::terminate}.
38053805
Otherwise, it throws the stored exception captured by \tcode{*this}.
38063806
\end{itemdescr}
38073807

0 commit comments

Comments
 (0)