]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++: Fix member alias template in C++17 and up. [PR96805]
authorJason Merrill <jason@redhat.com>
Thu, 8 Oct 2020 19:43:26 +0000 (15:43 -0400)
committerJason Merrill <jason@redhat.com>
Tue, 24 Nov 2020 17:51:25 +0000 (12:51 -0500)
commite89ebd3e896f27d4afc400044d5a2b69cb524bcb
treee302b3a5b869f61474bc82921b6b3b21d6bd56ee
parentdd2c4e4e97331b1b3d9081191d14f8967d73e31c
c++: Fix member alias template in C++17 and up. [PR96805]

Here we're trying to push into a<T>::c<N> in order to instantiate t<N>, but
were building a TYPENAME_TYPE for it because a<T> isn't open yet.  Don't
do that when we know we're trying to enter the scope.

gcc/cp/ChangeLog:

PR c++/96805
PR c++/96199
* pt.c (tsubst_aggr_type): Don't build a TYPENAME_TYPE when
entering_scope.
(tsubst_template_decl): Use tsubst_aggr_type.

gcc/testsuite/ChangeLog:

PR c++/96805
* g++.dg/cpp0x/alias-decl-pr96805.C: New test.
gcc/cp/pt.c
gcc/testsuite/g++.dg/cpp0x/alias-decl-pr96805.C [new file with mode: 0644]