1 // RUN: %clang_cc1 -std=c++11 -verify %s
3 namespace std_example
{
5 struct B
: A
{ using A::A
; };
7 struct C1
: B
{ using B::B
; };
8 struct C2
: B
{ using B::B
; };
11 using C1::C1
; // expected-note {{inherited from base class 'C1' here}}
12 using C2::C2
; // expected-note {{inherited from base class 'C2' here}}
15 struct V1
: virtual B
{ using B::B
; };
16 struct V2
: virtual B
{ using B::B
; };
23 D1
d1(0); // expected-error {{constructor of 'A' inherited from multiple base class subobjects}}
24 D2
d2(0); // OK: initializes virtual B base class, which initializes the A base class
25 // then initializes the V1 and V2 base classes as if by a defaulted default constructor
27 struct M
{ M(); M(int); };
28 struct N
: M
{ using M::M
; };
30 struct P
: N
, O
{ using N::N
; using O::O
; };
31 P
p(0); // OK: use M(0) to initialize N's base class,
32 // use M() to initialize O's base class