p7.cpp revision a1366cbab89ec6d4f630dca91e85d03d9e5d1d7d
1// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
2
3// Straight from the standard
4struct B1 {
5  B1(int); // expected-note {{previous constructor}} expected-note {{conflicting constructor}}
6};
7struct B2 {
8  B2(int); // expected-note {{conflicting constructor}}
9};
10struct D1 : B1, B2 {
11  using B1::B1; // expected-note {{inherited here}} expected-error {{not supported}}
12  using B2::B2; // expected-error {{already inherited constructor with the same signature}} expected-error {{not supported}}
13};
14struct D2 : B1, B2 {
15  using B1::B1; // expected-error {{not supported}}
16  using B2::B2; // expected-error {{not supported}}
17  D2(int);
18};
19
20template<typename T> struct B3 {
21  B3(T); // expected-note {{previous constructor}}
22};
23template<typename T> struct B4 : B3<T>, B1 {
24  B4();
25  using B3<T>::B3; // expected-note {{inherited here}} expected-error {{not supported}}
26  using B1::B1; // expected-error {{already inherited}} expected-error {{not supported}}
27};
28B4<char> b4c;
29B4<int> b4i; // expected-note {{here}}
30