https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97134
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Patrick Palka <ppa...@gcc.gnu.org>: https://gcc.gnu.org/g:c755e1b3eadaf1c7e751a2c7ce1d418c6db8463a commit r11-8145-gc755e1b3eadaf1c7e751a2c7ce1d418c6db8463a Author: Patrick Palka <ppa...@redhat.com> Date: Mon Apr 12 23:22:03 2021 -0400 c++: variadic class template placeholder deduction [PR97134] do_class_deduction handles specially the case where we're deducing one placeholder from another equivalent one, but here the initializer passed to do_class_deduction is wrapped in an EXPR_PACK_EXPANSION (we're being called from unify during get_partial_spec_bindings). This patch makes do_class_deduction look through EXPR_PACK_EXPANSIONs so that we detect this case as well. gcc/cp/ChangeLog: PR c++/97134 * pt.c (do_class_deduction): Look through EXPR_PACK_EXPANSION when checking if the initializer is an equivalent class placeholder template parameter. gcc/testsuite/ChangeLog: PR c++/97134 * g++.dg/cpp2a/nontype-class43.C: New test.