Skip to content
Open
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
2 changes: 1 addition & 1 deletion source/compatibility.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1618,7 +1618,7 @@
\change
Remove \tcode{raw_storage_iterator}.
\rationale
The iterator encouraged use of potentially-throwing algorithms, but did
The iterator encouraged use of potentially throwing algorithms, but did
not return the number of elements successfully constructed,
as would be necessary to destroy them.
\effect
Expand Down
2 changes: 1 addition & 1 deletion source/declarations.tex
Original file line number Diff line number Diff line change
Expand Up @@ -7737,7 +7737,7 @@

\pnum
The expression \keyword{co_await} \tcode{\exposid{promise}.final_suspend()}
shall not be potentially-throwing\iref{except.spec}.
shall not be potentially throwing\iref{except.spec}.

\rSec2[dcl.fct.def.replace]{Replaceable function definitions}

Expand Down
44 changes: 22 additions & 22 deletions source/exceptions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@
\end{note}
\begin{example}
\begin{codeblock}
extern void f(); // potentially-throwing
extern void f(); // potentially throwing

void g() noexcept {
f(); // valid, even if \tcode{f} throws
Expand Down Expand Up @@ -760,9 +760,9 @@
is called the \defn{exception specification} of the function.
If the predicate is false,
the function has a
\indextext{exception specification!potentially-throwing}%
\defnx{potentially-throwing exception specification}%
{potentially-throwing!exception specification},
\indextext{exception specification!potentially throwing}%
\defnx{potentially throwing exception specification}%
{potentially throwing!exception specification},
otherwise it has a
\indextext{exception specification!non-throwing}%
\defn{non-throwing exception specification}.
Expand Down Expand Up @@ -849,30 +849,30 @@
The declaration of
\tcode{D::f}
is ill-formed because it
has a potentially-throwing exception specification,
has a potentially throwing exception specification,
whereas
\tcode{B::f}
has a non-throwing exception specification.
\end{example}

\pnum
An expression $E$ is
\defnx{potentially-throwing}{potentially-throwing!expression} if
\defnx{potentially throwing}{potentially throwing!expression} if
\begin{itemize}
\item
$E$ is a function call\iref{expr.call}
whose \grammarterm{postfix-expression}
has a function type,
or a pointer-to-function type,
with a potentially-throwing exception specification,
with a potentially throwing exception specification,
or
\item
$E$ implicitly invokes a function
(such as an overloaded operator,
an allocation function in a \grammarterm{new-expression},
a constructor for a function argument,
or a destructor)
that has a potentially-throwing exception specification,
that has a potentially throwing exception specification,
or
\item
$E$ is a \grammarterm{throw-expression}\iref{expr.throw},
Expand All @@ -889,16 +889,16 @@
or
\item
any of the immediate subexpressions\iref{intro.execution}
of $E$ that is not an unevaluated operand is potentially-throwing.
of $E$ that is not an unevaluated operand is potentially throwing.
\end{itemize}

\pnum
An implicitly-declared constructor for a class \tcode{X},
or a constructor without a \grammarterm{noexcept-specifier}
that is defaulted on its first declaration,
has a potentially-throwing exception specification
has a potentially throwing exception specification
if and only if
any of the following constructs is potentially-throwing:
any of the following constructs is potentially throwing:
\begin{itemize}
\item
the invocation of a constructor selected by overload resolution
Expand All @@ -925,20 +925,20 @@
\pnum
The exception specification for an implicitly-declared destructor,
or a destructor without a \grammarterm{noexcept-specifier},
is potentially-throwing if and only if
is potentially throwing if and only if
any of the destructors
for any of its potentially constructed subobjects
has a potentially-throwing exception specification or
has a potentially throwing exception specification or
the destructor is virtual and the destructor of any virtual base class
has a potentially-throwing exception specification.
has a potentially throwing exception specification.

\pnum
The exception specification for an implicitly-declared assignment operator,
or an assignment-operator without a \grammarterm{noexcept-specifier}
that is defaulted on its first declaration,
is potentially-throwing if and only if
is potentially throwing if and only if
the invocation of any assignment operator
in the implicit definition is potentially-throwing.
in the implicit definition is potentially throwing.

\pnum
A deallocation function\iref{basic.stc.dynamic.deallocation}
Expand All @@ -953,9 +953,9 @@
\end{itemize}
without a \grammarterm{noexcept-specifier}
that is defaulted on its first declaration
is potentially-throwing if and only if
is potentially throwing if and only if
any expression
in the implicit definition is potentially-throwing.
in the implicit definition is potentially throwing.

\pnum
\begin{example}
Expand All @@ -975,18 +975,18 @@
int n = 7;
struct D : public A, public B {
int * p = new int[n];
// \tcode{D::D()} potentially-throwing, as the \keyword{new} operator may throw \tcode{bad_alloc} or \tcode{bad_array_new_length}
// \tcode{D::D()} potentially throwing, as the \keyword{new} operator may throw \tcode{bad_alloc} or \tcode{bad_array_new_length}
// \tcode{D::D(const D\&)} non-throwing
// \tcode{D::D(D\&\&)} potentially-throwing, as the default argument for \tcode{B}'s constructor may throw
// \tcode{D::\~D()} potentially-throwing
// \tcode{D::D(D\&\&)} potentially throwing, as the default argument for \tcode{B}'s constructor may throw
// \tcode{D::\~D()} potentially throwing
};
\end{codeblock}
Furthermore, if
\tcode{A::\~{}A()}
were virtual,
the program would be ill-formed since a function that overrides a virtual
function from a base class
shall not have a potentially-throwing exception specification
shall not have a potentially throwing exception specification
if the base class function has a non-throwing exception specification.
\end{example}

Expand Down
12 changes: 6 additions & 6 deletions source/exec.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1836,7 +1836,7 @@
set_error(std::move(rcvr), current_exception());
}
\end{codeblock}
if \tcode{expr} is potentially-throwing; otherwise, \tcode{expr}.
if \tcode{expr} is potentially throwing; otherwise, \tcode{expr}.
\tcode{\exposid{TRY-SET-VALUE}(rcvr, expr)} is
\begin{codeblock}
@\exposid{TRY-EVAL}@(rcvr, @\exposid{SET-VALUE}@(rcvr, expr))
Expand Down Expand Up @@ -6799,7 +6799,7 @@
Let \exposid{sch} be an expression of type \exposid{run-loop-scheduler}.
The expression \tcode{schedule(\exposid{sch})}
has type \exposid{run-loop-\newline sender} and
is not potentially-throwing if \exposid{sch} is not potentially-throwing.
is not potentially throwing if \exposid{sch} is not potentially throwing.

\pnum
For type \exposid{set-tag} other than \tcode{set_error_t},
Expand Down Expand Up @@ -6835,8 +6835,8 @@
\item
The expression \tcode{connect(\exposid{sndr}, \exposid{rcvr})}
has type \tcode{\exposid{run-loop-opstate}<decay_t<decltype((\exposid{rcvr}))>>}
and is potentially-throwing if and only if
\tcode{(void(\exposid{sndr}), auto(\exposid{rcvr}))} is potentially-throwing.
and is potentially throwing if and only if
\tcode{(void(\exposid{sndr}), auto(\exposid{rcvr}))} is potentially throwing.
\item
The expression \tcode{get_completion_scheduler<C>(get_env(\exposid{sndr}))}
has type \exposid{run-loop-scheduler} and
Expand Down Expand Up @@ -7422,8 +7422,8 @@
where \tcode{CS} is \tcode{completion_signatures<set_value_t()>},
then the expression \tcode{connect(sndr, rcvr)} has
type \tcode{\exposid{inline-state}<remove_cvref_t<decltype((rcvr))>>}
and is potentially-throwing if and only if
\tcode{((void)sndr, auto(rcvr))} is potentially-throwing.
and is potentially throwing if and only if
\tcode{((void)sndr, auto(rcvr))} is potentially throwing.

\pnum
Let \tcode{\placeholder{o}} be a non-\tcode{const} lvalue of type
Expand Down
6 changes: 3 additions & 3 deletions source/expressions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -3506,7 +3506,7 @@
into its associated \grammarterm{constant-expression} is performed.
\item
If the value of the converted \grammarterm{constant-expression} is \tcode{true},
$E$ shall not be a potentially-throwing expression.
$E$ shall not be a potentially throwing expression.
\end{itemize}

\item
Expand Down Expand Up @@ -3994,7 +3994,7 @@
\begin{note}
This requirement allows the case
when the expression has the type of a
potentially-throwing function, but the called function has
potentially throwing function, but the called function has
a non-throwing exception specification,
and the function types are otherwise the same.
\end{note}
Expand Down Expand Up @@ -5931,7 +5931,7 @@
\pnum
The result of the \keyword{noexcept} operator is a prvalue of type \keyword{bool}.
The result is \tcode{false} if
the full-expression of the operand is potentially-throwing\iref{except.spec}, and
the full-expression of the operand is potentially throwing\iref{except.spec}, and
\tcode{true} otherwise.
\begin{note}
A \grammarterm{noexcept-expression}
Expand Down
4 changes: 2 additions & 2 deletions source/intro.tex
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,8 @@
\indexdefn{expression-equivalent}%
expressions that all have the same effects,
either
are all potentially-throwing or
are all not potentially-throwing,
are all potentially throwing or
are all not potentially throwing,
and
either
are all \termref{defns.const.subexpr}{constant subexpression}{s} or
Expand Down
4 changes: 2 additions & 2 deletions source/lib-intro.tex
Original file line number Diff line number Diff line change
Expand Up @@ -3956,9 +3956,9 @@
\Cpp{} standard library
\indextext{specifications!\Cpp{}}%
that do not have a \throws paragraph
but do have a potentially-throwing exception specification
but do have a potentially throwing exception specification
may throw \impldef{exceptions thrown by standard library functions that have a
potentially-throwing exception specification} exceptions.
potentially throwing exception specification} exceptions.
\begin{footnote}
In particular, they
can report a failure to allocate storage by throwing an exception of type
Expand Down
2 changes: 1 addition & 1 deletion source/templates.tex
Original file line number Diff line number Diff line change
Expand Up @@ -8775,7 +8775,7 @@
\item
If the original \tcode{A} is
a function pointer or pointer-to-member-function type
with a potentially-throwing exception specification\iref{except.spec},
with a potentially throwing exception specification\iref{except.spec},
the exception specification.
\item
Any cv-qualifiers in \tcode{A}
Expand Down