gcc/testsuite/g++.dg/cpp0x/inh-ctor15.C
raw| 1 | // Discussions on the core reflector indicate that not inheriting base copy |
| 2 | // constructors was a deliberate choice. |
| 3 | |
| 4 | // { dg-do compile { target c++11 } } |
| 5 | // { dg-options -fno-new-inheriting-ctors } |
| 6 | |
| 7 | struct A { A(int); }; |
| 8 | struct B: public A |
| 9 | { |
| 10 | using A::A; |
| 11 | }; |
| 12 | |
| 13 | A a (42); |
| 14 | |
| 15 | B b1 (24); // inherited |
| 16 | B b2 (a); // not inherited { dg-error "no match" } |