aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0341-PR-c-45698.patch
blob: 43ba88bd971b214dbd54ea6827f6fa28e5409896 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
From 0f9adc22fa4b355389f3e55c0ce8deac3c82301f Mon Sep 17 00:00:00 2001
From: jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
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 <class... Ts> struct tuple { };
+
+template<class... Ts>
+struct A {
+  template<typename T> struct N { };
+  tuple<N<Ts>...> tup;
+};
+
+int main()
+{
+  A<int, double> a;
+}
-- 
1.7.0.4