File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -1055,6 +1055,23 @@ namespace dr471 { // dr471: 2.8
10551055 // expected-note@#dr471-G-using {{declared private here}}
10561056}
10571057
1058+ namespace dr472 { // dr472: no drafting
1059+ struct B {
1060+ int i; // #dr472-i
1061+ };
1062+ struct I : protected B {}; // #dr472-struct-I
1063+ struct D : public I {
1064+ void f (I *ip) {
1065+ ip->i = 0 ;
1066+ // expected-error@-1 {{'i' is a protected member of 'dr472::B'}}
1067+ // expected-note@#dr472-struct-I {{constrained by protected inheritance here}}
1068+ // expected-note@#dr472-i {{member is declared here}}
1069+ B *bp = ip;
1070+ bp->i = 5 ;
1071+ }
1072+ };
1073+ }
1074+
10581075namespace dr474 { // dr474: 3.4
10591076 namespace N {
10601077 struct S {
Original file line number Diff line number Diff line change @@ -2872,7 +2872,7 @@ <h2 id="cxxdr">C++ defect report implementation status</h2>
28722872 <td><a href="https://cplusplus.github.io/CWG/issues/472.html">472</a></td>
28732873 <td>drafting</td>
28742874 <td>Casting across protected inheritance</td>
2875- <td align="center">Not resolved </td>
2875+ <td class="none" align="center">No </td>
28762876 </tr>
28772877 <tr id="473">
28782878 <td><a href="https://cplusplus.github.io/CWG/issues/473.html">473</a></td>
You can’t perform that action at this time.
0 commit comments