diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/variadic-ex11.C')
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/variadic-ex11.C | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-ex11.C b/gcc/testsuite/g++.dg/cpp0x/variadic-ex11.C new file mode 100644 index 000000000..57ef2a3d3 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/variadic-ex11.C @@ -0,0 +1,9 @@ +// { dg-options "-std=gnu++0x" } +template<typename... Types> + void f(Types... args); + +void g() { + f(); // okay: args contains no arguments + f(1); // okay: args contains one int argument + (2, 1.0); // okay: args contains two arguments, an int and a double +} |