/cp
[official-gcc.git] / gcc / testsuite / g++.dg / cpp1y / pr84588-2.C
blob402ac293bcb364fc378dfa5ad808ff2aa14ee0a2
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   }) {}