From 0f9adc22fa4b355389f3e55c0ce8deac3c82301f Mon Sep 17 00:00:00 2001 From: jason Date: Wed, 25 May 2011 20:30:12 +0000 Subject: [PATCH] PR c++/45698 * pt.c (dependent_template_arg_p): See through ARGUMENT_PACK_SELECT. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@174236 138bc75d-0d04-0410-961f-82ee72b054a4 index 3afeb9b..7c71092 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -18512,6 +18512,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); new file mode 100644 index 0000000..86f1bb1 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/variadic110.C @@ -0,0 +1,15 @@ +// PR c++/45698 +// { dg-options -std=c++0x } + +template struct tuple { }; + +template +struct A { + template struct N { }; + tuple...> tup; +}; + +int main() +{ + A a; +} -- 1.7.0.4