Merged revisions 208012,208018-208019,208021,208023-208030,208033,208037,208040-20804...
[official-gcc.git] / main / gcc / testsuite / g++.dg / cpp0x / constexpr-diag5.C
blobc8043e3bdb4ffe26a85987d7d8faec9001c14e02
1 // Origin: PR c++/51633
2 // { dg-do compile { target c++11 } }
4 struct A
6     constexpr A() {}
7     ~A();
8 };
10 struct B
12     A a;
13     A b;
14     A c;
15     constexpr B() {}
18 struct C
20     A a;
21     constexpr C() {}
24 struct D
26     constexpr D() { return;} // { dg-error "does not have empty body" }
29 struct D1
31     A a;
32     constexpr D1() { return;} // { dg-error "does not have empty body" }
35 struct D2
37     A a;
38     A b;
39     constexpr D2() { return;} // { dg-error "does not have empty body" }
42 struct D3
44     A a;
45     A b;
46     A c;
47     constexpr D3() { return;} // { dg-error "does not have empty body" }