PR c++/86728 - C variadic generic lambda.
[official-gcc.git] / gcc / testsuite / g++.dg / init / pr29043.C
blob61845951a4acc98ebb0bc9484e44c4c120d09f9c
1 // PR c++/29043
2 // { dg-do compile }
4 struct S // { dg-message "implicitly deleted" "" { target c++11 } }
5          // { dg-error "uninitialized" "" { target c++11 } .-1 }
7   int const i; // { dg-message "should be initialized" }
8 };
10 class C
12 public:
13   C() {} // { dg-error "uninitialized const member|deleted" }
14   S s;
17 struct S2 // { dg-message "implicitly deleted" "" { target c++11 } }
18           // { dg-error "uninitialized" "" { target c++11 } .-1 }
20   int& ref;   // { dg-message "should be initialized" }
23 class C2
25 public:
26   C2() {} // { dg-error "uninitialized reference member|deleted" }
27   S2 s;
30 class C3
32   C3() { }
33   struct s {
34     const int i;
35   };
38 struct S4 // { dg-message "implicitly deleted" "" { target c++11 } }
39           // { dg-error "uninitialized" "" { target c++11 } .-1 }
41   int const i; // { dg-message "should be initialized" }
44 struct C4
46   C4() {} // { dg-error "uninitialized const member|deleted" }
47   S4 s4[ 1 ];
50 struct C5
52   C5() {} // { dg-error "uninitialized" }
53   int const iit[ 1 ];