summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/variadic41.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/variadic41.C')
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic41.C14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic41.C b/gcc/testsuite/g++.dg/cpp0x/variadic41.C
new file mode 100644
index 000000000..9cfd847f3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic41.C
@@ -0,0 +1,14 @@
+// A function parameter pack is only deduced if it's at the end
+// { dg-options "-std=gnu++0x" }
+template<typename... Args>
+void f(const Args&... args, int oops);
+
+int main()
+{
+ f<>(1);
+ f(1);
+ f<int>(1,2);
+ f(1,2); // { dg-error "no match" }
+}
+
+// { dg-prune-output "note" }