]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++: CTAD and member alias template [PR102123]
authorJason Merrill <jason@redhat.com>
Sun, 27 Mar 2022 03:54:22 +0000 (23:54 -0400)
committerJason Merrill <jason@redhat.com>
Mon, 28 Mar 2022 19:11:48 +0000 (15:11 -0400)
commite952290874d6b99946dc02e125c0fb0e9b13a1e3
treef3c3da00271350ad4937bfcce0f5a87a31807a91
parent10dcd13ff7a9f0fbbae8749929e8808792c76395
c++: CTAD and member alias template [PR102123]

When building a deduction guide from the Test constructor, we need to
rewrite the use of _dummy into a dependent reference, i.e. Test<T>::template
_dummy.  We were using SCOPE_REF for both type and non-type templates; we
need to use UNBOUND_CLASS_TEMPLATE for type templates.

PR c++/102123

gcc/cp/ChangeLog:

* pt.c (tsubst_copy): Use make_unbound_class_template for rewriting
a type template reference.

gcc/testsuite/ChangeLog:

* g++.dg/cpp1z/class-deduction110.C: New test.
gcc/cp/pt.c
gcc/testsuite/g++.dg/cpp1z/class-deduction110.C [new file with mode: 0644]