diff options
Diffstat (limited to 'test/CXX/special/class.inhctor/p7.cpp')
-rw-r--r-- | test/CXX/special/class.inhctor/p7.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/test/CXX/special/class.inhctor/p7.cpp b/test/CXX/special/class.inhctor/p7.cpp index 736754d8a3e30..9ae160f0547ab 100644 --- a/test/CXX/special/class.inhctor/p7.cpp +++ b/test/CXX/special/class.inhctor/p7.cpp @@ -2,7 +2,7 @@ // Straight from the standard struct B1 { - B1(int); // expected-note {{previous constructor}} + B1(int); // expected-note {{previous constructor}} expected-note {{conflicting constructor}} }; struct B2 { B2(int); // expected-note {{conflicting constructor}} @@ -16,3 +16,14 @@ struct D2 : B1, B2 { using B2::B2; D2(int); }; + +template<typename T> struct B3 { + B3(T); // expected-note {{previous constructor}} +}; +template<typename T> struct B4 : B3<T>, B1 { + B4(); + using B3<T>::B3; // expected-note {{inherited here}} + using B1::B1; // expected-error {{already inherited}} +}; +B4<char> b4c; +B4<int> b4i; // expected-note {{here}} |