]>
Commit | Line | Data |
---|---|---|
3f6079dd JM |
1 | // PR c++/37860 |
2 | // { dg-options "-std=c++0x" } | |
3 | ||
4 | struct b | |
5 | { | |
6 | bool t; | |
7 | ||
8 | b() = default; | |
9 | ~b() = default; | |
10 | b& operator=(const b&) = delete; | |
9a71b305 | 11 | b(const b&) = delete; // { dg-error "declared" } |
3f6079dd JM |
12 | |
13 | b(bool _t): t (_t) { } | |
14 | }; | |
15 | ||
16 | int main() | |
17 | { | |
18 | // copy list initialization | |
19 | b tst1 = { false }; | |
20 | ||
21 | // copy initialization. | |
9a71b305 | 22 | b tst2 = false; // { dg-error "use" } |
3f6079dd JM |
23 | |
24 | // direct list initialization | |
25 | b tst3 { false }; | |
26 | ||
27 | // default initialization | |
28 | b tst4; | |
29 | } |