summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/variadic-ex10.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/variadic-ex10.C')
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic-ex10.C9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-ex10.C b/gcc/testsuite/g++.dg/cpp0x/variadic-ex10.C
new file mode 100644
index 000000000..a392bd7d4
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic-ex10.C
@@ -0,0 +1,9 @@
+// { dg-options "-std=gnu++0x" }
+template<typename... Types> struct Tuple { };
+
+Tuple<> t0; // Types contains no arguments
+Tuple<int> t1; // Types contains one argument: int
+Tuple<int, float> t2; // Types contains two arguments: int and float
+Tuple<0> error; // { dg-error "mismatch" }
+// { dg-error "expected a type" "" { target *-*-* } 7 }
+// { dg-error "in declaration" "" { target *-*-* } 7 }