Merged revisions 208012,208018-208019,208021,208023-208030,208033,208037,208040-20804...
[official-gcc.git] / main / gcc / testsuite / g++.dg / cpp0x / inh-ctor5.C
blob8c79c833a32233abef0b2b280799ae0928cf6b4f
1 // { dg-do compile { target c++11 } }
3 struct B1 {
4   B1(int) { }
5 };
6 struct B2 {
7   B2(double) { }
8 };
9 struct D1 : B1 {    // { dg-error "no match" }
10   using B1::B1;     // implicitly declares D1(int)
11   int x;
13 void test() {
14   D1 d(6);          // OK: d.x is not initialized
15   D1 e;             // { dg-error "deleted" } D1 has no default constructor
17 struct D2 : B2 {
18   using B2::B2;     // { dg-error "no match" } implicitly declares D2(double)
19   B1 b;
21 D2 f(1.0);          // { dg-error "deleted" } B1 has no default constructor