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.
This commit is contained in:
parent
9675ccd64e
commit
32b6e917ac
1 changed files with 6 additions and 0 deletions
6
gcc/testsuite/g++.dg/cpp1z/class-deduction77.C
Normal file
6
gcc/testsuite/g++.dg/cpp1z/class-deduction77.C
Normal file
|
@ -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})...>;
|
Loading…
Add table
Reference in a new issue