diff options
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0341-PR-c-45698.patch')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0341-PR-c-45698.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0341-PR-c-45698.patch b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0341-PR-c-45698.patch new file mode 100644 index 0000000000..43ba88bd97 --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0341-PR-c-45698.patch | |||
@@ -0,0 +1,44 @@ | |||
1 | From 0f9adc22fa4b355389f3e55c0ce8deac3c82301f Mon Sep 17 00:00:00 2001 | ||
2 | From: jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | ||
3 | Date: Wed, 25 May 2011 20:30:12 +0000 | ||
4 | Subject: [PATCH] PR c++/45698 | ||
5 | * pt.c (dependent_template_arg_p): See through ARGUMENT_PACK_SELECT. | ||
6 | |||
7 | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@174236 138bc75d-0d04-0410-961f-82ee72b054a4 | ||
8 | |||
9 | index 3afeb9b..7c71092 100644 | ||
10 | --- a/gcc/cp/pt.c | ||
11 | +++ b/gcc/cp/pt.c | ||
12 | @@ -18512,6 +18512,9 @@ dependent_template_arg_p (tree arg) | ||
13 | if (arg == error_mark_node) | ||
14 | return true; | ||
15 | |||
16 | + if (TREE_CODE (arg) == ARGUMENT_PACK_SELECT) | ||
17 | + arg = ARGUMENT_PACK_SELECT_ARG (arg); | ||
18 | + | ||
19 | if (TREE_CODE (arg) == TEMPLATE_DECL | ||
20 | || TREE_CODE (arg) == TEMPLATE_TEMPLATE_PARM) | ||
21 | return dependent_template_p (arg); | ||
22 | new file mode 100644 | ||
23 | index 0000000..86f1bb1 | ||
24 | --- /dev/null | ||
25 | +++ b/gcc/testsuite/g++.dg/cpp0x/variadic110.C | ||
26 | @@ -0,0 +1,15 @@ | ||
27 | +// PR c++/45698 | ||
28 | +// { dg-options -std=c++0x } | ||
29 | + | ||
30 | +template <class... Ts> struct tuple { }; | ||
31 | + | ||
32 | +template<class... Ts> | ||
33 | +struct A { | ||
34 | + template<typename T> struct N { }; | ||
35 | + tuple<N<Ts>...> tup; | ||
36 | +}; | ||
37 | + | ||
38 | +int main() | ||
39 | +{ | ||
40 | + A<int, double> a; | ||
41 | +} | ||
42 | -- | ||
43 | 1.7.0.4 | ||
44 | |||