summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/variadic-unify-2.C
diff options
context:
space:
mode:
authordodji <dodji@138bc75d-0d04-0410-961f-82ee72b054a4>2010-01-07 19:21:46 +0000
committerdodji <dodji@138bc75d-0d04-0410-961f-82ee72b054a4>2010-01-07 19:21:46 +0000
commitbeb8be281281825b184e0e987dd239d1708fbb50 (patch)
treec6ba028fdb64ff90cbb07c7f3741fe2f070b3bfb /gcc/testsuite/g++.dg/cpp0x/variadic-unify-2.C
parent9beea099e8ed1da4237330e6061e575f5295b09b (diff)
downloadgcc-beb8be281281825b184e0e987dd239d1708fbb50.tar.gz
Fix PR c++/40155
gcc/cp/ChangeLog: c++/40155 * pt.c (unify_pack_expansion): In non-deduced contexts, re-use template arguments that were previously deduced. gcc/testsuite/ChangeLog: c++/40155 * g++.dg/cpp0x/variadic-unify-2.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@155705 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/variadic-unify-2.C')
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic-unify-2.C14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-unify-2.C b/gcc/testsuite/g++.dg/cpp0x/variadic-unify-2.C
new file mode 100644
index 00000000000..80c9f5d2c3a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic-unify-2.C
@@ -0,0 +1,14 @@
+// Contributed by Dodji Seketeli <dodji@redhat.com>
+// Origin: PR c++/40155
+// { dg-options "-std=c++0x" }
+// { dg-do compile }
+
+template <typename T> struct identity
+{ typedef T type; };
+
+template <typename RT, typename... A>
+int forward_call(RT (*) (A...), typename identity<A>::type...);
+
+int g (double);
+
+int i = forward_call(&g, 0);