PR c++/59989
* pt.c (expand_template_argument_pack): Correct
non_default_args_count calculation.
From-SVN: r207285
2014-01-29 Jason Merrill <jason@redhat.com>
+ PR c++/59989
+ * pt.c (expand_template_argument_pack): Correct
+ non_default_args_count calculation.
+
PR c++/58466
* pt.c (unify_pack_expansion): Call expand_template_argument_pack.
for (i = 0; i < num_packed; ++i, ++out_arg)
TREE_VEC_ELT (result_args, out_arg) = TREE_VEC_ELT(packed, i);
if (non_default_args_count > 0)
- non_default_args_count += num_packed;
+ non_default_args_count += num_packed - 1;
}
else
{
--- /dev/null
+// PR c++/59989
+// { dg-require-effective-target c++11 }
+
+template<typename T> struct X {};
+template<template<typename...> class D, typename ...U> int test(D<U...>*);
+int n = test<X, int>(0); // { dg-error "no match" }