]> gcc.gnu.org Git - gcc.git/blob - gcc/testsuite/g++.dg/cpp0x/initlist9.C
PR c++/92590 - wrong handling of inherited default ctor.
[gcc.git] / gcc / testsuite / g++.dg / cpp0x / initlist9.C
1 // PR c++/37860
2 // { dg-do compile { target c++11 } }
3
4 struct b
5 {
6 bool t;
7
8 b() = default;
9 ~b() = default;
10 b& operator=(const b&) = delete;
11 b(const b&) = delete; // { dg-message "declared" "" { target c++14_down } }
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.
22 b tst2 = false; // { dg-error "use" "" { target c++14_down } }
23
24 // direct list initialization
25 b tst3 { false };
26
27 // default initialization
28 b tst4;
29 }
This page took 0.042122 seconds and 5 git commands to generate.