1 // RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s 2 // 3 // Note: [class.inhctor] was removed by P0136R1. This tests the new behavior 4 // for the wording that used to be there. 5 6 struct B1 { // expected-note 2{{candidate}} 7 B1(int); // expected-note {{candidate}} 8 }; 9 struct B2 { // expected-note 2{{candidate}} 10 B2(int); // expected-note {{candidate}} 11 }; 12 struct D1 : B1, B2 { // expected-note 2{{candidate}} 13 using B1::B1; // expected-note 3{{inherited here}} 14 using B2::B2; // expected-note 3{{inherited here}} 15 }; 16 struct D2 : B1, B2 { 17 using B1::B1; 18 using B2::B2; 19 D2(int); 20 }; 21 D1 d1(0); // expected-error {{ambiguous}} 22 D2 d2(0); 23 24 template<typename T> struct B3 { 25 B3(T); 26 }; 27 template<typename T> struct B4 : B3<T>, B1 { 28 B4(); 29 using B3<T>::B3; 30 using B1::B1; 31 }; 32 B4<char> b4c; 33 B4<int> b4i; 34 35 struct B5 { 36 template<typename T> B5(T); 37 }; 38 struct D6 : B5 { 39 using B5::B5; 40 template<typename T> D6(T); 41 }; 42 D6 d6(0); 43 struct D7 : B5 { 44 using B5::B5; 45 template<typename T> D7(T, ...); 46 }; 47 // DRxxx (no number yet): derived class ctor beats base class ctor. 48 D7 d7(0); 49