diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/variadic47.C')
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/variadic47.C | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic47.C b/gcc/testsuite/g++.dg/cpp0x/variadic47.C new file mode 100644 index 000000000..d80371c0e --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/variadic47.C @@ -0,0 +1,18 @@ +// { dg-options "-std=gnu++0x" } +template<typename T> struct wrap { }; + +template<typename... Args> +int& f(const Args&...); + +template<typename... Args> +float& f(const wrap<Args>&...); + +int& g(int x, float y, double z) +{ + return f(x, y, z); +} + +float& h(wrap<int> x, wrap<float> y, wrap<double> z) +{ + return f(x, y, z); +} |