Skip to content

Commit b580699

Browse files
authored
[std] Harmonize phrasing 'terminate is invoked' (#4005)
instead of saying 'is called'. Also add cross-references to [except.terminate]. Also use 'exits via an exception' consistently.
1 parent fa67415 commit b580699

File tree

4 files changed

+47
-53
lines changed

4 files changed

+47
-53
lines changed

source/exceptions.tex

+14-20
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@
334334
If the exception handling mechanism
335335
handling an uncaught exception\iref{except.uncaught}
336336
directly invokes a function that exits via an
337-
exception, the function \tcode{std::terminate} is called\iref{except.terminate}.
337+
exception, the function \tcode{std::terminate} is invoked\iref{except.terminate}.
338338
\begin{example}
339339
\begin{codeblock}
340340
struct C {
@@ -608,12 +608,10 @@
608608

609609
\pnum
610610
If no matching handler is found,
611-
the function
611+
the function \tcode{std::terminate} is invoked;
612+
whether or not the stack is unwound before this invocation of
612613
\tcode{std::terminate}
613-
is called;
614-
whether or not the stack is unwound before this call to
615-
\tcode{std::terminate}
616-
is \impldef{stack unwinding before call to
614+
is \impldef{stack unwinding before invocation of
617615
\tcode{std::terminate}}\iref{except.terminate}.
618616

619617
\pnum
@@ -785,7 +783,7 @@
785783
and the search for a handler\iref{except.handle}
786784
encounters the outermost block of a function with a
787785
non-throwing exception specification,
788-
the function \tcode{std::terminate} is called\iref{except.terminate}.
786+
the function \tcode{std::terminate} is invoked\iref{except.terminate}.
789787
\begin{note}
790788
An implementation is not permitted to reject an expression merely because, when
791789
executed, it throws or might
@@ -1066,28 +1064,24 @@
10661064
\pnum
10671065
\indextext{\idxcode{terminate}}%
10681066
In such cases,
1069-
the function \tcode{std::terminate}
1070-
is called\iref{exception.terminate}.
1067+
the function \tcode{std::terminate} is invoked\iref{exception.terminate}.
10711068
In the situation where no matching handler is found, it is
1072-
\impldef{stack unwinding before call to \tcode{std::terminate}} whether or not the
1073-
stack is unwound
1074-
before
1075-
\tcode{std::terminate}
1076-
is called.
1069+
\impldef{stack unwinding before invocation of \tcode{std::terminate}}
1070+
whether or not the stack is unwound
1071+
before \tcode{std::terminate} is invoked.
10771072
In the situation where the search for a handler\iref{except.handle} encounters the
10781073
outermost block of a function
10791074
with a non-throwing exception specification\iref{except.spec}, it is
1080-
\impldef{whether stack is unwound before calling the function \tcode{std::terminate}
1081-
when a \tcode{noexcept} specification
1082-
is violated}
1075+
\impldef{whether stack is unwound before invoking the function \tcode{std::terminate}
1076+
when a \tcode{noexcept} specification is violated}
10831077
whether the stack is unwound, unwound partially, or not unwound at all
1084-
before the function \tcode{std::terminate} is called.
1078+
before the function \tcode{std::terminate} is invoked.
10851079
In all other situations, the stack shall not be unwound before
10861080
the function \tcode{std::terminate}
1087-
is called.
1081+
is invoked.
10881082
An implementation is not permitted to finish stack unwinding
10891083
prematurely based on a determination that the unwind process
1090-
will eventually cause a call to the function
1084+
will eventually cause an invocation of the function
10911085
\tcode{std::terminate}.
10921086

10931087
\rSec2[except.uncaught]{The \tcode{std::uncaught_exceptions} function}%

source/support.tex

+7-9
Original file line numberDiff line numberDiff line change
@@ -1995,8 +1995,8 @@
19951995
\tcode{main}.
19961996
\end{footnote}
19971997

1998-
If control leaves a registered function called by \tcode{exit} because the function does
1999-
not provide a handler for a thrown exception, the function \tcode{std::terminate} shall be called\iref{except.terminate}.%
1998+
If a registered function invoked by \tcode{exit} exits via an exception,
1999+
the function \tcode{std::terminate} is invoked\iref{except.terminate}.%
20002000
\indexlibraryglobal{terminate}%
20012001

20022002
\item
@@ -2076,9 +2076,9 @@
20762076
reverse order of their registration, except that a function shall be called after any
20772077
previously registered functions that had already been called at the time it was
20782078
registered. Objects shall not be destroyed as a result of calling \tcode{quick_exit}.
2079-
If control leaves a registered function called by \tcode{quick_exit} because the
2080-
function does not provide a handler for a thrown exception, the function \tcode{std::terminate} shall
2081-
be called.\indexlibraryglobal{terminate}
2079+
If a registered function invoked by \tcode{quick_exit} exits via an exception,
2080+
the function \tcode{std::terminate} is invoked\iref{except.terminate}.%
2081+
\indexlibraryglobal{terminate}
20822082
\begin{note}
20832083
A function registered via \tcode{at_quick_exit}
20842084
is invoked by the thread that calls \tcode{quick_exit},
@@ -3630,10 +3630,8 @@
36303630

36313631
\begin{itemdescr}
36323632
\pnum
3633-
The type of a
3634-
\term{handler function}
3635-
to be called by
3636-
\tcode{std::terminate()}
3633+
The type of a \term{handler function}
3634+
to be invoked by \tcode{terminate}
36373635
\indexlibraryglobal{terminate}%
36383636
when terminating exception processing.
36393637

source/threads.tex

+18-16
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,7 @@
796796
the callbacks registered by associated \tcode{stop_callback} objects
797797
are synchronously called.
798798
If an invocation of a callback exits via an exception
799-
then \tcode{terminate} is called\iref{except.terminate}.
799+
then \tcode{terminate} is invoked\iref{except.terminate}.
800800
\begin{note}
801801
A stop request includes notifying all condition variables
802802
of type \tcode{condition_variable_any}
@@ -937,7 +937,7 @@
937937
If evaluating
938938
\tcode{std::forward<Callback>(callback)()}
939939
exits via an exception,
940-
then \tcode{terminate} is called\iref{except.terminate}.
940+
then \tcode{terminate} is invoked\iref{except.terminate}.
941941
\end{itemdescr}
942942

943943
\indexlibrarydtor{stop_callback}%
@@ -1224,7 +1224,7 @@
12241224
of \tcode{f} will be thrown in the constructing thread, not the new thread.
12251225
\end{note}
12261226
If the invocation of \tcode{invoke} terminates with an uncaught exception,
1227-
\tcode{terminate} is called.
1227+
\tcode{terminate} is invoked\iref{except.terminate}.
12281228

12291229
\pnum
12301230
\sync
@@ -1270,7 +1270,8 @@
12701270
\begin{itemdescr}
12711271
\pnum
12721272
\effects
1273-
If \tcode{joinable()}, calls \tcode{terminate()}. Otherwise, has no effects.
1273+
If \tcode{joinable()}, invokes \tcode{terminate}\iref{except.terminate}.
1274+
Otherwise, has no effects.
12741275
\begin{note}
12751276
Either implicitly detaching or joining a \tcode{joinable()} thread in its
12761277
destructor could result in difficult to debug correctness (for detach) or performance
@@ -1290,7 +1291,8 @@
12901291
\begin{itemdescr}
12911292
\pnum
12921293
\effects
1293-
If \tcode{joinable()}, calls \tcode{terminate()}. Otherwise, assigns the
1294+
If \tcode{joinable()}, invokes \tcode{terminate}\iref{except.terminate}.
1295+
Otherwise, assigns the
12941296
state of \tcode{x} to \tcode{*this} and sets \tcode{x} to a default constructed state.
12951297

12961298
\pnum
@@ -4398,7 +4400,7 @@
43984400
\pnum
43994401
\remarks
44004402
If the function fails to meet the postcondition, \tcode{terminate()}
4401-
is called\iref{except.terminate}.
4403+
is invoked\iref{except.terminate}.
44024404
\begin{note}
44034405
This can happen if the re-locking of the mutex throws an exception.
44044406
\end{note}
@@ -4442,7 +4444,7 @@
44424444
\pnum
44434445
\remarks
44444446
If the function fails to meet the postcondition, \tcode{terminate()}
4445-
is called\iref{except.terminate}.
4447+
is invoked\iref{except.terminate}.
44464448
\begin{note}
44474449
This can happen if the re-locking of the mutex throws an exception.
44484450
\end{note}
@@ -4504,7 +4506,7 @@
45044506
\pnum
45054507
\remarks
45064508
If the function fails to meet the postcondition, \tcode{terminate()}
4507-
is called\iref{except.terminate}.
4509+
is invoked\iref{except.terminate}.
45084510
\begin{note}
45094511
This can happen if the re-locking of the mutex throws an exception.
45104512
\end{note}
@@ -4554,8 +4556,8 @@
45544556

45554557
\pnum
45564558
\remarks
4557-
If the function fails to meet the postcondition, \tcode{terminate()}
4558-
is called\iref{except.terminate}.
4559+
If the function fails to meet the postcondition, \tcode{terminate}
4560+
is invoked\iref{except.terminate}.
45594561
\begin{note}
45604562
This can happen if the re-locking of the mutex throws an exception.
45614563
\end{note}
@@ -4610,7 +4612,7 @@
46104612
\pnum
46114613
\remarks
46124614
If the function fails to meet the postcondition, \tcode{terminate()}
4613-
is called\iref{except.terminate}.
4615+
is invoked\iref{except.terminate}.
46144616
\begin{note}
46154617
This can happen if the re-locking of the mutex throws an exception.
46164618
\end{note}
@@ -4671,7 +4673,7 @@
46714673
\pnum
46724674
\remarks
46734675
If the function fails to meet the postcondition, \tcode{terminate()}
4674-
is called\iref{except.terminate}.
4676+
is invoked\iref{except.terminate}.
46754677
\begin{note}
46764678
This can happen if the re-locking of the mutex throws an exception.
46774679
\end{note}
@@ -4831,7 +4833,7 @@
48314833
\pnum
48324834
\remarks
48334835
If the function fails to meet the postcondition, \tcode{terminate()}
4834-
is called\iref{except.terminate}.
4836+
is invoked\iref{except.terminate}.
48354837
\begin{note}
48364838
This can happen if the re-locking of the mutex throws an exception.
48374839
\end{note}
@@ -4898,7 +4900,7 @@
48984900
\pnum
48994901
\remarks
49004902
If the function fails to meet the postcondition, \tcode{terminate()}
4901-
is called\iref{except.terminate}.
4903+
is invoked\iref{except.terminate}.
49024904
\begin{note}
49034905
This can happen if the re-locking of the mutex throws an exception.
49044906
\end{note}
@@ -4935,8 +4937,8 @@
49354937

49364938
\pnum
49374939
\remarks
4938-
If the function fails to meet the postcondition, \tcode{terminate()}
4939-
is called\iref{except.terminate}.
4940+
If the function fails to meet the postcondition, \tcode{terminate}
4941+
is invoked\iref{except.terminate}.
49404942
\begin{note}
49414943
This can happen if the re-locking of the mutex throws an exception.
49424944
\end{note}

source/utilities.tex

+8-8
Original file line numberDiff line numberDiff line change
@@ -18648,8 +18648,8 @@
1864818648
\pnum
1864918649
During the execution of a parallel algorithm with
1865018650
the \tcode{execution::sequenced_policy} policy,
18651-
if the invocation of an element access function exits via an uncaught exception,
18652-
\tcode{terminate()} is called.
18651+
if the invocation of an element access function exits via an exception,
18652+
\tcode{terminate} is invoked\iref{except.terminate}.
1865318653
\end{itemdescr}
1865418654

1865518655
\rSec2[execpol.par]{Parallel execution policy}
@@ -18668,8 +18668,8 @@
1866818668
\pnum
1866918669
During the execution of a parallel algorithm with
1867018670
the \tcode{execution::parallel_policy} policy,
18671-
if the invocation of an element access function exits via an uncaught exception,
18672-
\tcode{terminate()} is called.
18671+
if the invocation of an element access function exits via an exception,
18672+
\tcode{terminate} is invoked\iref{except.terminate}.
1867318673
\end{itemdescr}
1867418674

1867518675
\rSec2[execpol.parunseq]{Parallel and unsequenced execution policy}
@@ -18689,8 +18689,8 @@
1868918689
\pnum
1869018690
During the execution of a parallel algorithm with
1869118691
the \tcode{execution::parallel_unsequenced_policy} policy,
18692-
if the invocation of an element access function exits via an uncaught exception,
18693-
\tcode{terminate()} is called.
18692+
if the invocation of an element access function exits via an exception,
18693+
\tcode{terminate} is invoked\iref{except.terminate}.
1869418694
\end{itemdescr}
1869518695

1869618696
\rSec2[execpol.unseq]{Unsequenced execution policy}
@@ -18710,8 +18710,8 @@
1871018710
\pnum
1871118711
During the execution of a parallel algorithm with
1871218712
the \tcode{execution::unsequenced_policy} policy,
18713-
if the invocation of an element access function exits via an uncaught exception,
18714-
\tcode{terminate()} is called.
18713+
if the invocation of an element access function exits via an exception,
18714+
\tcode{terminate} is invoked\iref{except.terminate}.
1871518715

1871618716
\rSec2[execpol.objects]{Execution policy objects}
1871718717

0 commit comments

Comments
 (0)