aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Palka <ppalka@redhat.com>2021-01-18 16:41:46 -0500
committerPatrick Palka <ppalka@redhat.com>2021-01-18 16:41:46 -0500
commit32b6e917ac4c6e6db1f84b02afd070055b70d1dc (patch)
treec2270d4a7dfeba3e1fee03028d7af5ff67a22219
parent9675ccd64efe78bc4791436c34d57cd894640f39 (diff)
downloadgcc-32b6e917ac4c6e6db1f84b02afd070055b70d1dc.zip
gcc-32b6e917ac4c6e6db1f84b02afd070055b70d1dc.tar.gz
gcc-32b6e917ac4c6e6db1f84b02afd070055b70d1dc.tar.bz2
c++: Add CTAD + pack expansion testcase
After r11-6614 made cp_walk_subtrees walk into the template of a CTAD placeholder, we now correctly accept the below testcase. We used to reject it because find_parameter_packs_r would fail to find the parameter pack Ts inside the CTAD placeholder within the pack expansion. gcc/testsuite/ChangeLog: * g++.dg/cpp1z/class-deduction77.C: New test.
-rw-r--r--gcc/testsuite/g++.dg/cpp1z/class-deduction77.C6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp1z/class-deduction77.C b/gcc/testsuite/g++.dg/cpp1z/class-deduction77.C
new file mode 100644
index 0000000..c5462fb
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1z/class-deduction77.C
@@ -0,0 +1,6 @@
+// { dg-do compile { target c++17 } }
+
+template <class...> struct A {};
+
+template <template <class> class... Ts>
+using B = A<decltype(Ts{0})...>;