2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
+ PR c++/34101
+ * name-lookup.c (arg_assoc_template_arg): Recurse on argument
+ packs.
+ (arg_assoc_type): We don't need to handle TYPE_ARGUMENT_PACK here,
+ since arg_assoc_template_arg will deal with them (better).
+
+2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
+
PR c++/33509
* pt.c (tsubst_exception_specification): Handle substitutions into
member templates, where tsubst_pack_expansion returns a
else
return arg_assoc_class (k, ctx);
}
+ /* It's an argument pack; handle it recursively. */
+ else if (ARGUMENT_PACK_P (arg))
+ {
+ tree args = ARGUMENT_PACK_ARGS (arg);
+ int i, len = TREE_VEC_LENGTH (args);
+ for (i = 0; i < len; ++i)
+ if (arg_assoc_template_arg (k, TREE_VEC_ELT (args, i)))
+ return true;
+
+ return false;
+ }
/* It's not a template template argument, but it is a type template
argument. */
else if (TYPE_P (arg))
return false;
case TYPE_PACK_EXPANSION:
return arg_assoc_type (k, PACK_EXPANSION_PATTERN (type));
- case TYPE_ARGUMENT_PACK:
- {
- tree args = ARGUMENT_PACK_ARGS (type);
- int i, len = TREE_VEC_LENGTH (args);
- for (i = 0; i < len; i++)
- if (arg_assoc_type (k, TREE_VEC_ELT (args, i)))
- return true;
- }
- break;
default:
gcc_unreachable ();
+2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
+
+ PR c++/34101
+ * g++.dg/cpp0x/variadic-ttp.C: New.
+
2007-12-04 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
* gcc.dg/parse-decl-after-if.c: New.
--- /dev/null
+// { dg-options -std=c++0x }
+// PR c++/34101
+template<typename> struct A {};
+
+template<template<typename> class...> struct B {};
+
+template<template<typename> class T> void foo(const B<T>&);
+
+void bar()
+{
+ foo(B<A>());
+}