view gcc/testsuite/g++.dg/cpp0x/inh-ctor15.C @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
line wrap: on
line source

// Discussions on the core reflector indicate that not inheriting base copy
// constructors was a deliberate choice.

// { dg-do compile { target c++11 } }
// { dg-options -fno-new-inheriting-ctors }

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" }