Commit 91db8b13 by Jason Merrill Committed by Jason Merrill

re PR c++/45698 (C++0x Variadic Templates: Infinite template recursion rather…

re PR c++/45698 (C++0x Variadic Templates: Infinite template recursion rather than an error message)

	PR c++/45698
	* pt.c (dependent_template_arg_p): See through ARGUMENT_PACK_SELECT.

From-SVN: r174229
parent df23ba64
2011-05-25 Jason Merrill <jason@redhat.com>
PR c++/45698
* pt.c (dependent_template_arg_p): See through ARGUMENT_PACK_SELECT.
PR c++/46145
* decl.c (grokdeclarator): Complain about auto typedef.
......
......@@ -18759,6 +18759,9 @@ dependent_template_arg_p (tree arg)
if (arg == error_mark_node)
return true;
if (TREE_CODE (arg) == ARGUMENT_PACK_SELECT)
arg = ARGUMENT_PACK_SELECT_ARG (arg);
if (TREE_CODE (arg) == TEMPLATE_DECL
|| TREE_CODE (arg) == TEMPLATE_TEMPLATE_PARM)
return dependent_template_p (arg);
......
2011-05-25 Jason Merrill <jason@redhat.com>
* g++.dg/cpp0x/variadic110.C: New.
* g++.dg/cpp0x/auto9.C: Add typedef test.
* g++.dg/cpp0x/auto23.C: New.
......
// PR c++/45698
// { dg-options -std=c++0x }
template <class... Ts> struct tuple { };
template<class... Ts>
struct A {
template<typename T> struct N { };
tuple<N<Ts>...> tup;
};
int main()
{
A<int, double> a;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment