Skip to content

Commit bb4acc8

Browse files
burblebeetkoeppe
authored andcommitted
CWG2618 Substitution during deduction should exclude exception specifications
1 parent 092dec0 commit bb4acc8

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

source/templates.tex

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7130,8 +7130,16 @@
71307130
obtained from default arguments are substituted.
71317131

71327132
\pnum
7133-
The substitution occurs in all types and expressions that are used in the function
7134-
type and in template parameter declarations. The expressions include not only
7133+
\indextext{deduction!deduction substitution loci}%
7134+
The \defn{deduction substitution loci} are
7135+
\begin{itemize}
7136+
\item the function type outside of the \grammarterm{noexcept-specifier},
7137+
\item the \grammarterm{explicit-specifier}, and
7138+
\item the template parameter declarations.
7139+
\end{itemize}
7140+
The substitution occurs in all types and expressions that are used
7141+
in the deduction substitution loci.
7142+
The expressions include not only
71357143
constant expressions such as those that appear in array bounds or as nontype
71367144
template arguments but also general expressions (i.e., non-constant expressions)
71377145
inside \tcode{sizeof}, \keyword{decltype}, and other contexts that allow non-constant
@@ -7175,11 +7183,8 @@
71757183
as part of the substitution
71767184
process.
71777185
\end{note}
7178-
Only invalid types and expressions in the immediate context of
7179-
the function type,
7180-
its template parameter types,
7181-
and its \grammarterm{explicit-specifier}
7182-
can result in a deduction failure.
7186+
Invalid types and expressions can result in a deduction failure
7187+
only in the immediate context of the deduction substitution loci.
71837188
\begin{note}
71847189
The substitution into types and expressions can result
71857190
in effects such as the instantiation of class template specializations and/or

0 commit comments

Comments
 (0)