/cp
[official-gcc.git] / gcc / testsuite / g++.dg / cpp1y / pr84588-1.C
blob35f3256800a390d00ed6f0d77878db98d4d903ea
1 // { dg-do compile { target c++14 } }
3 struct a {
4   void b() {}
5   void c(void (*) () = [] {
6       if (a a(int auto) {})  // { dg-error "two or more data types|condition declares a function" }
7       ;
8   }) {}
9 };
11 struct d {
12   void e() {}
13   void f(void (*) () = [] {
14       for (;d d(int auto) {};)  // { dg-error "two or more data types|condition declares a function" }
15       ;
16   }) {}
19 struct g {
20   void h() {}
21   void i(void (*) () = [] {
22       while (g g(int auto) {})  // { dg-error "two or more data types|condition declares a function" }
23       ;
24   }) {}