Skip to content

Commit 7226ced

Browse files
committed
[over.match.class.deduct] Switch from imperative to passive, and clarify
what happens if the various 'if' conditions are not met.
1 parent 6e84545 commit 7226ced

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

source/overloading.tex

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1573,7 +1573,7 @@
15731573
\pnum
15741574
When resolving a placeholder for a deduced class type\iref{dcl.type.simple}
15751575
where the \grammarterm{template-name} names an alias template \tcode{A},
1576-
the \grammarterm{defining-type-id} must be of the form
1576+
the \grammarterm{defining-type-id} of \tcode{A} must be of the form
15771577
\begin{ncsimplebnf}
15781578
\opt{\keyword{typename}} \opt{nested-name-specifier} \opt{\keyword{template}} simple-template-id
15791579
\end{ncsimplebnf}
@@ -1587,27 +1587,30 @@
15871587
according to the following procedure and add it to the set:
15881588
\begin{itemize}
15891589
\item
1590-
Deduce the template arguments of the return type of \tcode{f}
1590+
The template arguments of the return type of \tcode{f}
1591+
are deduced
15911592
from the \grammarterm{defining-type-id} of \tcode{A}
15921593
according to the process in \ref{temp.deduct.type}
15931594
with the exception that deduction does not fail
15941595
if not all template arguments are deduced.
15951596
Let \tcode{g} denote the result of substituting
15961597
these deductions into \tcode{f}.
15971598
If the substitution fails, no \tcode{f'} is produced.
1598-
Form the function or function template \tcode{f'} as follows:
1599+
Otherwise, the function or function template \tcode{f'} is formed as follows:
15991600
\begin{itemize}
16001601
\item
16011602
The function type of \tcode{f'} is the function type of \tcode{g}.
16021603
\item
16031604
If \tcode{f} is a function template,
1604-
the template parameter list of \tcode{f'} consists of
1605+
\tcode{f'} is a function template whose
1606+
template parameter list consists of
16051607
all the template parameters of \tcode{A}
16061608
(including their default template arguments)
16071609
that appear in the above deductions or
16081610
(recursively) in their default template arguments,
16091611
followed by the template parameters of \tcode{f} that were not deduced
1610-
(including their default template arguments).
1612+
(including their default template arguments),
1613+
otherwise \tcode{f'} is not a function template.
16111614
\item
16121615
The associated constraints\iref{temp.constr.decl} are
16131616
the conjunction of the associated constraints of \tcode{g} and

0 commit comments

Comments
 (0)