]> gcc.gnu.org Git - gcc.git/commit
PR c++/87366 - wrong error with alias template.
authorJason Merrill <jason@redhat.com>
Mon, 22 Apr 2019 19:16:46 +0000 (15:16 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Mon, 22 Apr 2019 19:16:46 +0000 (15:16 -0400)
commitf2b6aeeab219cc41ebc763e8e8378f83287d3591
tree5463b687bd25e7cba53974befa499a9967e41cf6
parent1e8dac32576fbde72a1ea44b567a2c10f332ecd2
PR c++/87366 - wrong error with alias template.

With this testcase the code in template_args_equal to treat aliases as
distinct wasn't sufficient, because it only looked at the top level, whereas
here we have a reference to the alias.  So let's also handle treating them
as distinct in structural_comptypes.  For GCC 10 I have a more comprehensive
patch, but for GCC 9 let's go with this smaller change.

* typeck.c (structural_comptypes): When comparing_specializations,
aliases are unequal.
(comptypes): When comparing_specializations, do structural
comparison.

From-SVN: r270494
gcc/cp/ChangeLog
gcc/cp/typeck.c
gcc/testsuite/g++.dg/cpp0x/alias-decl-66.C [new file with mode: 0644]
This page took 0.063907 seconds and 5 git commands to generate.