diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic41.C')
-rw-r--r-- | gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic41.C | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic41.C b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic41.C new file mode 100644 index 0000000..df11367 --- /dev/null +++ b/gcc-4.9/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-do compile { target c++11 } } +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" } |