/cp
[official-gcc.git] / gcc / testsuite / g++.dg / cpp1y / pr84588-3.C
blob477c3e3f51c5faee4be3d4deb32d29d7c5eca157
1 // { dg-do compile { target c++14 } }
3 struct a {
4   void b() {}
5   void c(void (*) () = [] {
6       if (a a(int auto)JUNK)  // { 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)JUNK;)  // { 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)JUNK)  // { dg-error "two or more data types|condition declares a function" }
23       ;
24   }) {}