c++: Fix deduction from auto template parameter [PR93083]
authorJason Merrill <jason@redhat.com>
Wed, 25 Nov 2020 22:05:24 +0000 (17:05 -0500)
committerJason Merrill <jason@redhat.com>
Fri, 4 Dec 2020 22:47:05 +0000 (17:47 -0500)
commita95753214b55d21e5b44eeb098cccf88d44c94dd
treebaf54176edc281d78bf9eb314bb06b74aa59a089
parentdf933e307b1950ce12472660dcac1765b8eb431d
c++: Fix deduction from auto template parameter [PR93083]

The check in do_class_deduction to handle passing one class placeholder
template parm as an argument for itself needed to be extended to also handle
equivalent parms from other templates.

gcc/cp/ChangeLog:

PR c++/93083
* pt.c (convert_template_argument): Handle equivalent placeholders.
(do_class_deduction): Look through EXPR_PACK_EXPANSION, too.

gcc/testsuite/ChangeLog:

PR c++/93083
* g++.dg/cpp2a/nontype-class40.C: New test.
gcc/cp/pt.c
gcc/testsuite/g++.dg/cpp2a/nontype-class40.C [new file with mode: 0644]