Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/inh-ctor26.C

raw
1 // PR c++/79503
2 // { dg-do compile { target c++11 } }
3
4 struct payload {};
5
6 struct base: private payload {
7 base(payload) {}
8 };
9
10 struct derived: base {
11 using base::base;
12 };
13
14 int main()
15 {
16 payload data;
17 // error: no matching function for call to 'derived::derived(payload&)'
18 // note: candidate: base::base(payload)
19 // note: an inherited constructor is not a candidate for initialization from an expression of the same or derived type
20 derived demo(data);
21 }