summaryrefslogtreecommitdiff
path: root/test/CXX/special/class.inhctor/p7.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2012-04-14 14:01:31 +0000
committerDimitry Andric <dim@FreeBSD.org>2012-04-14 14:01:31 +0000
commitdbe13110f59f48b4dbb7552b3ac2935acdeece7f (patch)
treebe1815eb79b42ff482a8562b13c2dcbf0c5dcbee /test/CXX/special/class.inhctor/p7.cpp
parent9da628931ebf2609493570f87824ca22402cc65f (diff)
Notes
Diffstat (limited to 'test/CXX/special/class.inhctor/p7.cpp')
-rw-r--r--test/CXX/special/class.inhctor/p7.cpp13
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}}