c++: alias-tmpl equivalence and default targs [PR103852]
authorJason Merrill <jason@redhat.com>
Fri, 1 Apr 2022 19:55:21 +0000 (15:55 -0400)
committerJason Merrill <jason@redhat.com>
Mon, 4 Apr 2022 14:43:33 +0000 (10:43 -0400)
commita11f204e5a30d1dfd2508e3f3014509a0342f604
tree94522b48491e007b1f98a227ee44cb4ec21287d6
parent2f0610acbc056052a108e4a46911fc21d0dca2ab
c++: alias-tmpl equivalence and default targs [PR103852]

The suggested resolution for CWG1286, which we implemented, ignores default
template arguments, but this PR is an example of why that doesn't make
sense: the templates aren't functionally equivalent.

PR c++/103852
DR 1286

gcc/cp/ChangeLog:

* pt.cc (get_underlying_template): Compare default template args.

gcc/testsuite/ChangeLog:

* g++.dg/cpp0x/alias-decl-dr1286a.C: Default args now matter.
* g++.dg/cpp1z/class-deduction-alias1.C: New test.
gcc/cp/pt.cc
gcc/testsuite/g++.dg/cpp0x/alias-decl-dr1286a.C
gcc/testsuite/g++.dg/cpp1z/class-deduction-alias1.C [new file with mode: 0644]