Skip to content

Commit 6e84545

Browse files
committed
[over.match.class.deduct] Fix failure to handle the case where a
deducible alias template's defining-type-id contains a nested-name-specifier (or 'typename' or 'template' keywords).
1 parent 269e7ed commit 6e84545

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

source/declarations.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1387,7 +1387,7 @@
13871387
The \grammarterm{nested-name-specifier}, if any, shall be non-dependent and
13881388
the \grammarterm{template-name} shall name a deducible template.
13891389
A \defnadj{deducible}{template} is either a class template or
1390-
an alias template whose \grammarterm{defining-type-id} is of the form
1390+
is an alias template whose \grammarterm{defining-type-id} is of the form
13911391
\begin{ncsimplebnf}
13921392
\opt{\keyword{typename}} \opt{nested-name-specifier} \opt{\keyword{template}} simple-template-id
13931393
\end{ncsimplebnf}

source/overloading.tex

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1572,18 +1572,24 @@
15721572

15731573
\pnum
15741574
When resolving a placeholder for a deduced class type\iref{dcl.type.simple}
1575-
where the \grammarterm{template-name} names an alias template \tcode{A}
1576-
whose \grammarterm{defining-type-id}
1577-
is a \grammarterm{simple-template-id} \tcode{B<L>},
1578-
the guides of \tcode{A} are the set of functions or function templates
1575+
where the \grammarterm{template-name} names an alias template \tcode{A},
1576+
the \grammarterm{defining-type-id} must be of the form
1577+
\begin{ncsimplebnf}
1578+
\opt{\keyword{typename}} \opt{nested-name-specifier} \opt{\keyword{template}} simple-template-id
1579+
\end{ncsimplebnf}
1580+
as specified in \ref{dcl.type.simple}.
1581+
The guides of \tcode{A} are the set of functions or function templates
15791582
formed as follows.
1580-
For each function or function template \tcode{f} in the guides of \tcode{B},
1583+
For each function or function template \tcode{f} in the guides of
1584+
the template named by the \grammarterm{simple-template-id}
1585+
of the \grammarterm{defining-type-id},
15811586
form a function or function template \tcode{f'}
15821587
according to the following procedure and add it to the set:
15831588
\begin{itemize}
15841589
\item
15851590
Deduce the template arguments of the return type of \tcode{f}
1586-
from \tcode{B<L>} according to the process in \ref{temp.deduct.type}
1591+
from the \grammarterm{defining-type-id} of \tcode{A}
1592+
according to the process in \ref{temp.deduct.type}
15871593
with the exception that deduction does not fail
15881594
if not all template arguments are deduced.
15891595
Let \tcode{g} denote the result of substituting

0 commit comments

Comments
 (0)