Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/constexpr-diag5.C

raw
1 // Origin: PR c++/51633
2 // { dg-do compile { target c++11 } }
3
4 struct A
5 {
6 constexpr A() {}
7 ~A();
8 };
9
10 struct B
11 {
12 A a;
13 A b;
14 A c;
15 constexpr B() {}
16 };
17
18 struct C
19 {
20 A a;
21 constexpr C() {}
22 };
23
24 struct D
25 {
26 constexpr D() { return;} // { dg-error "does not have empty body" "" { target c++11_only } }
27 };
28
29 struct D1
30 {
31 A a;
32 constexpr D1() { return;} // { dg-error "does not have empty body" "" { target c++11_only } }
33 };
34
35 struct D2
36 {
37 A a;
38 A b;
39 constexpr D2() { return;} // { dg-error "does not have empty body" "" { target c++11_only } }
40 };
41
42 struct D3
43 {
44 A a;
45 A b;
46 A c;
47 constexpr D3() { return;} // { dg-error "does not have empty body" "" { target c++11_only } }
48 };