aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic114.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic114.C')
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic114.C27
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic114.C b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic114.C
new file mode 100644
index 000000000..82ffe83c7
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic114.C
@@ -0,0 +1,27 @@
+// PR c++/49785
+// { dg-do compile { target c++11 } }
+
+template <typename, typename ...> struct B { };
+template <typename> class A;
+
+template <typename R, typename ... S>
+struct A <R (S ...)> : public B <R, S ...>
+{
+ struct C {};
+ template <typename D> A (D, C = C ()) { }
+ R operator () (...);
+};
+
+template <typename R, typename ... S, typename T>
+auto operator >> (A <R (S ...)>, T)->A <R (S ...)>
+{
+ []() {};
+}
+
+int
+main ()
+{
+ A <int (int, int)> a = [](int, int) {};
+ auto b = []{};
+ (a >> b) (3, 5);
+}