]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/g++.dg/cpp0x/initlist9.C
* decl2.c (mark_used): Adjust error for use of deleted function.
[thirdparty/gcc.git] / gcc / testsuite / g++.dg / cpp0x / initlist9.C
CommitLineData
3f6079dd
JM
1// PR c++/37860
2// { dg-options "-std=c++0x" }
3
4struct 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
16int 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}