pt.c (argument_pack_element_is_expansion_p): A decl pack is an expansion.
authorJason Merrill <jason@redhat.com>
Mon, 6 Jul 2015 22:13:37 +0000 (18:13 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Mon, 6 Jul 2015 22:13:37 +0000 (18:13 -0400)
* pt.c (argument_pack_element_is_expansion_p): A decl pack is an
expansion.

From-SVN: r225494

gcc/cp/ChangeLog
gcc/cp/pt.c

index c72954dd82ea1dc27153643076892553e584f5fb..cb598776a506f80fd20d65e3647af279189f75c8 100644 (file)
@@ -1,3 +1,8 @@
+2015-07-06  Jason Merrill  <jason@redhat.com>
+
+       * pt.c (argument_pack_element_is_expansion_p): A decl pack is an
+       expansion.
+
 2015-07-02  Jason Merrill  <jason@redhat.com>
 
        PR c++/66743
index e819b69ede35a02ffb4a72cde1f746ff3e46fe75..0302de1270d7ba40f4fb7ba23bf9ac53eca5c0cc 100644 (file)
@@ -9838,6 +9838,9 @@ argument_pack_element_is_expansion_p (tree arg_pack, int i)
   if (i >= TREE_VEC_LENGTH (vec))
     return 0;
   tree elt = TREE_VEC_ELT (vec, i);
+  if (DECL_P (elt))
+    /* A decl pack is itself an expansion.  */
+    elt = TREE_TYPE (elt);
   if (!PACK_EXPANSION_P (elt))
     return 0;
   if (PACK_EXPANSION_EXTRA_ARGS (elt))