c++: compare one level of template parms
commite85c596ae2d1e5f5b769b5af4c0a8e7d055e40d7
authorJason Merrill <jason@redhat.com>
Fri, 17 Nov 2023 22:17:32 +0000 (17 17:17 -0500)
committerJason Merrill <jason@redhat.com>
Mon, 20 Nov 2023 02:52:35 +0000 (19 21:52 -0500)
treefa01662f896f8ae10e7748c25e84eedd40805308
parentc51eafc1a185f7ad00820f11a7aa7bf4a82093fa
c++: compare one level of template parms

There should never be a reason to compare more than one level of template
parameters; additional levels are for the enclosing context, which is either
irrelevant (for a template template parameter) or already compared (for a
member template).

Also, the comp_template_parms handling of type parameters was wrongly
checking for TEMPLATE_TYPE_PARM when a type parameter appears here as a
TYPE_DECL.

gcc/cp/ChangeLog:

* pt.cc (comp_template_parms): Just one level.
(template_parameter_lists_equivalent_p): Likewise.
gcc/cp/pt.cc