summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/variadic-ex3.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/variadic-ex3.C')
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic-ex3.C11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-ex3.C b/gcc/testsuite/g++.dg/cpp0x/variadic-ex3.C
new file mode 100644
index 000000000..bd973055d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic-ex3.C
@@ -0,0 +1,11 @@
+// { dg-options "-std=gnu++0x" }
+template<class X, class Y, class... Z> X f(Y); // { dg-message "note" }
+void g()
+{
+ int i = f<int>(5.6);
+ int j = f(5.6); // { dg-error "no matching" }
+ // { dg-message "candidate" "candidate note" { target *-*-* } 6 }
+ f<void>(f<int, bool>);
+ f<void>(f<int>); // { dg-error "no matching" }
+ // { dg-message "candidate" "candidate note" { target *-*-* } 9 }
+}