aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2017-06-28 19:59:44 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2017-06-28 19:59:44 +0000
commit51629b8516eaff3fe10a2ecb60c348d6219e36cc (patch)
tree263323a24ffaba8b5d234cfc2f92f277a43f7232
parent34e400324df70d06d5489fd9c638653087c02ec8 (diff)
PR c++/61022 - error with variadic template template parm
* pt.c (convert_template_argument): Keep the TYPE_PACK_EXPANSION. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@249756 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/cp/ChangeLog3
-rw-r--r--gcc/cp/pt.c2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic-ttp8.C27
3 files changed, 31 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index ae6de7f009c..9c21f6f363e 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,8 @@
2017-06-28 Jason Merrill <jason@redhat.com>
+ PR c++/61022 - error with variadic template template parm
+ * pt.c (convert_template_argument): Keep the TYPE_PACK_EXPANSION.
+
PR c++/72801 - ICE with variadic partial specialization
* pt.c (unify_pack_expansion): Use PACK_EXPANSION_EXTRA_ARGS.
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index b86b346164d..fa75037aa3d 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -7695,7 +7695,7 @@ convert_template_argument (tree parm,
if (TREE_CODE (TREE_TYPE (arg)) == UNBOUND_CLASS_TEMPLATE)
/* The number of argument required is not known yet.
Just accept it for now. */
- val = TREE_TYPE (arg);
+ val = orig_arg;
else
{
tree parmparm = DECL_INNERMOST_TEMPLATE_PARMS (parm);
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-ttp8.C b/gcc/testsuite/g++.dg/cpp0x/variadic-ttp8.C
new file mode 100644
index 00000000000..f3e576ae988
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic-ttp8.C
@@ -0,0 +1,27 @@
+// PR c++/69111
+// { dg-do compile { target c++11 } }
+
+template <template <typename> class ...>
+struct template_list {};
+
+template <typename T>
+struct A
+{};
+
+template <typename>
+struct B
+{
+ template <typename T>
+ using type = A<T>;
+};
+
+template <typename ... Types>
+struct C
+{
+ using type = template_list<B<Types>::template type...>;
+};
+
+int main()
+{
+ return 0;
+}