]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++: alias and non-type template parm [PR116223]
authorJason Merrill <jason@redhat.com>
Mon, 5 Aug 2024 15:21:05 +0000 (11:21 -0400)
committerJason Merrill <jason@redhat.com>
Tue, 6 Aug 2024 17:04:23 +0000 (13:04 -0400)
commit4add6cd341a779e980e41ed6fb49175fca37496e
tree36f78c59bb39e198699e522020e6dc924572eb8a
parent352c21c8a22a48d34cbd2fbfe398ee12c0a1d681
c++: alias and non-type template parm [PR116223]

My r14-8291 for PR112632 introduced IMPLICIT_CONV_EXPR_FORCED to express
conversions to the type of an alias template parameter.  In this example,
that broke deduction of X in the call to foo, so let's teach deduction to
look through it.

PR c++/116223
PR c++/112632

gcc/cp/ChangeLog:

* pt.cc (deducible_expression): Also look through
IMPLICIT_CONV_EXPR_FORCED.
(unify): Likewise.

gcc/testsuite/ChangeLog:

* g++.dg/cpp1z/nontype-auto25.C: New test.
gcc/cp/pt.cc
gcc/testsuite/g++.dg/cpp1z/nontype-auto25.C [new file with mode: 0644]