]> git.ipfire.org Git - thirdparty/gcc.git/commit
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>
Wed, 9 Dec 2020 05:44:00 +0000 (00:44 -0500)
commite6e42891d80c12c4fac36d6273b8d4e31a3d0a2a
tree2c755886e822f48d241017fec55da7be2000640a
parentb7316ee222859e0f5c262f334b5e51cbbed15eea
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]