diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.dg/cpp0x/inh-ctor15.C')
-rw-r--r-- | gcc-4.9/gcc/testsuite/g++.dg/cpp0x/inh-ctor15.C | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/inh-ctor15.C b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/inh-ctor15.C new file mode 100644 index 0000000..c2d33bf --- /dev/null +++ b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/inh-ctor15.C @@ -0,0 +1,15 @@ +// Discussions on the core reflector indicate that not inheriting base copy +// constructors was a deliberate choice. + +// { dg-do compile { target c++11 } } + +struct A { A(int); }; +struct B: public A +{ + using A::A; +}; + +A a (42); + +B b1 (24); // inherited +B b2 (a); // not inherited { dg-error "no match" } |