c++, coroutines: Simplify separation of the user function body and ramp.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp1y / lambda-generic-using1.C
blob2912a754a8119967344a2c1f49608b2bfbfc5703
1 // PR c++/88123
2 // { dg-do compile { target c++14 } }
4 struct bar {};
5 struct baz {};
6 struct baq {};
8 namespace foo
10   void operator+(bar);
11 } // namespace foo
13 namespace foo2
15   void operator-(baz);
16 }  
18 auto fn() {
19   using foo::operator+;
20   using namespace foo2;
21   extern void operator!(baq);
22   return [](auto x, auto y, auto z) { +x; -y; !z; };
25 int main()
27   auto l = fn();
28   l(bar(),baz(),baq());