Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[std] Harmonize phrasing 'terminate is invoked' #4005

Merged
merged 1 commit into from
Oct 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 14 additions & 20 deletions source/exceptions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@
If the exception handling mechanism
handling an uncaught exception\iref{except.uncaught}
directly invokes a function that exits via an
exception, the function \tcode{std::terminate} is called\iref{except.terminate}.
exception, the function \tcode{std::terminate} is invoked\iref{except.terminate}.
\begin{example}
\begin{codeblock}
struct C {
Expand Down Expand Up @@ -608,12 +608,10 @@

\pnum
If no matching handler is found,
the function
the function \tcode{std::terminate} is invoked;
whether or not the stack is unwound before this invocation of
\tcode{std::terminate}
is called;
whether or not the stack is unwound before this call to
\tcode{std::terminate}
is \impldef{stack unwinding before call to
is \impldef{stack unwinding before invocation of
\tcode{std::terminate}}\iref{except.terminate}.

\pnum
Expand Down Expand Up @@ -785,7 +783,7 @@
and the search for a handler\iref{except.handle}
encounters the outermost block of a function with a
non-throwing exception specification,
the function \tcode{std::terminate} is called\iref{except.terminate}.
the function \tcode{std::terminate} is invoked\iref{except.terminate}.
\begin{note}
An implementation is not permitted to reject an expression merely because, when
executed, it throws or might
Expand Down Expand Up @@ -1066,28 +1064,24 @@
\pnum
\indextext{\idxcode{terminate}}%
In such cases,
the function \tcode{std::terminate}
is called\iref{exception.terminate}.
the function \tcode{std::terminate} is invoked\iref{exception.terminate}.
In the situation where no matching handler is found, it is
\impldef{stack unwinding before call to \tcode{std::terminate}} whether or not the
stack is unwound
before
\tcode{std::terminate}
is called.
\impldef{stack unwinding before invocation of \tcode{std::terminate}}
whether or not the stack is unwound
before \tcode{std::terminate} is invoked.
In the situation where the search for a handler\iref{except.handle} encounters the
outermost block of a function
with a non-throwing exception specification\iref{except.spec}, it is
\impldef{whether stack is unwound before calling the function \tcode{std::terminate}
when a \tcode{noexcept} specification
is violated}
\impldef{whether stack is unwound before invoking the function \tcode{std::terminate}
when a \tcode{noexcept} specification is violated}
whether the stack is unwound, unwound partially, or not unwound at all
before the function \tcode{std::terminate} is called.
before the function \tcode{std::terminate} is invoked.
In all other situations, the stack shall not be unwound before
the function \tcode{std::terminate}
is called.
is invoked.
An implementation is not permitted to finish stack unwinding
prematurely based on a determination that the unwind process
will eventually cause a call to the function
will eventually cause an invocation of the function
\tcode{std::terminate}.

\rSec2[except.uncaught]{The \tcode{std::uncaught_exceptions} function}%
Expand Down
16 changes: 7 additions & 9 deletions source/support.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1995,8 +1995,8 @@
\tcode{main}.
\end{footnote}

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

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

\begin{itemdescr}
\pnum
The type of a
\term{handler function}
to be called by
\tcode{std::terminate()}
The type of a \term{handler function}
to be invoked by \tcode{terminate}
\indexlibraryglobal{terminate}%
when terminating exception processing.

Expand Down
34 changes: 18 additions & 16 deletions source/threads.tex
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@
the callbacks registered by associated \tcode{stop_callback} objects
are synchronously called.
If an invocation of a callback exits via an exception
then \tcode{terminate} is called\iref{except.terminate}.
then \tcode{terminate} is invoked\iref{except.terminate}.
\begin{note}
A stop request includes notifying all condition variables
of type \tcode{condition_variable_any}
Expand Down Expand Up @@ -937,7 +937,7 @@
If evaluating
\tcode{std::forward<Callback>(callback)()}
exits via an exception,
then \tcode{terminate} is called\iref{except.terminate}.
then \tcode{terminate} is invoked\iref{except.terminate}.
\end{itemdescr}

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

\pnum
\sync
Expand Down Expand Up @@ -1270,7 +1270,8 @@
\begin{itemdescr}
\pnum
\effects
If \tcode{joinable()}, calls \tcode{terminate()}. Otherwise, has no effects.
If \tcode{joinable()}, invokes \tcode{terminate}\iref{except.terminate}.
Otherwise, has no effects.
\begin{note}
Either implicitly detaching or joining a \tcode{joinable()} thread in its
destructor could result in difficult to debug correctness (for detach) or performance
Expand All @@ -1290,7 +1291,8 @@
\begin{itemdescr}
\pnum
\effects
If \tcode{joinable()}, calls \tcode{terminate()}. Otherwise, assigns the
If \tcode{joinable()}, invokes \tcode{terminate}\iref{except.terminate}.
Otherwise, assigns the
state of \tcode{x} to \tcode{*this} and sets \tcode{x} to a default constructed state.

\pnum
Expand Down Expand Up @@ -4398,7 +4400,7 @@
\pnum
\remarks
If the function fails to meet the postcondition, \tcode{terminate()}
is called\iref{except.terminate}.
is invoked\iref{except.terminate}.
\begin{note}
This can happen if the re-locking of the mutex throws an exception.
\end{note}
Expand Down Expand Up @@ -4442,7 +4444,7 @@
\pnum
\remarks
If the function fails to meet the postcondition, \tcode{terminate()}
is called\iref{except.terminate}.
is invoked\iref{except.terminate}.
\begin{note}
This can happen if the re-locking of the mutex throws an exception.
\end{note}
Expand Down Expand Up @@ -4504,7 +4506,7 @@
\pnum
\remarks
If the function fails to meet the postcondition, \tcode{terminate()}
is called\iref{except.terminate}.
is invoked\iref{except.terminate}.
\begin{note}
This can happen if the re-locking of the mutex throws an exception.
\end{note}
Expand Down Expand Up @@ -4554,8 +4556,8 @@

\pnum
\remarks
If the function fails to meet the postcondition, \tcode{terminate()}
is called\iref{except.terminate}.
If the function fails to meet the postcondition, \tcode{terminate}
is invoked\iref{except.terminate}.
\begin{note}
This can happen if the re-locking of the mutex throws an exception.
\end{note}
Expand Down Expand Up @@ -4610,7 +4612,7 @@
\pnum
\remarks
If the function fails to meet the postcondition, \tcode{terminate()}
is called\iref{except.terminate}.
is invoked\iref{except.terminate}.
\begin{note}
This can happen if the re-locking of the mutex throws an exception.
\end{note}
Expand Down Expand Up @@ -4671,7 +4673,7 @@
\pnum
\remarks
If the function fails to meet the postcondition, \tcode{terminate()}
is called\iref{except.terminate}.
is invoked\iref{except.terminate}.
\begin{note}
This can happen if the re-locking of the mutex throws an exception.
\end{note}
Expand Down Expand Up @@ -4831,7 +4833,7 @@
\pnum
\remarks
If the function fails to meet the postcondition, \tcode{terminate()}
is called\iref{except.terminate}.
is invoked\iref{except.terminate}.
\begin{note}
This can happen if the re-locking of the mutex throws an exception.
\end{note}
Expand Down Expand Up @@ -4898,7 +4900,7 @@
\pnum
\remarks
If the function fails to meet the postcondition, \tcode{terminate()}
is called\iref{except.terminate}.
is invoked\iref{except.terminate}.
\begin{note}
This can happen if the re-locking of the mutex throws an exception.
\end{note}
Expand Down Expand Up @@ -4935,8 +4937,8 @@

\pnum
\remarks
If the function fails to meet the postcondition, \tcode{terminate()}
is called\iref{except.terminate}.
If the function fails to meet the postcondition, \tcode{terminate}
is invoked\iref{except.terminate}.
\begin{note}
This can happen if the re-locking of the mutex throws an exception.
\end{note}
Expand Down
16 changes: 8 additions & 8 deletions source/utilities.tex
Original file line number Diff line number Diff line change
Expand Up @@ -18648,8 +18648,8 @@
\pnum
During the execution of a parallel algorithm with
the \tcode{execution::sequenced_policy} policy,
if the invocation of an element access function exits via an uncaught exception,
\tcode{terminate()} is called.
if the invocation of an element access function exits via an exception,
\tcode{terminate} is invoked\iref{except.terminate}.
\end{itemdescr}

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

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

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

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

Expand Down