111
|
1 // PR c++/49785
|
|
2 // { dg-do compile { target c++11 } }
|
131
|
3 // { dg-additional-options "-Wno-return-type" }
|
111
|
4
|
|
5 template <typename, typename ...> struct B { };
|
|
6 template <typename> class A;
|
|
7
|
|
8 template <typename R, typename ... S>
|
|
9 struct A <R (S ...)> : public B <R, S ...>
|
|
10 {
|
|
11 struct C {};
|
|
12 template <typename D> A (D, C = C ()) { }
|
|
13 R operator () (...);
|
|
14 };
|
|
15
|
|
16 template <typename R, typename ... S, typename T>
|
|
17 auto operator >> (A <R (S ...)>, T)->A <R (S ...)>
|
|
18 {
|
|
19 []() {};
|
|
20 }
|
|
21
|
|
22 int
|
|
23 main ()
|
|
24 {
|
|
25 A <int (int, int)> a = [](int, int) {};
|
|
26 auto b = []{};
|
|
27 (a >> b) (3, 5);
|
|
28 }
|