| 1 |
// { dg-do compile } |
| 2 |
|
| 3 |
// Origin: <[email protected]> |
| 4 |
|
| 5 |
// PR c++/7809: Befriending inaccessible name. |
| 6 |
|
| 7 |
class A { |
| 8 |
private: |
| 9 |
void f(); // { dg-message "private" } |
| 10 |
}; |
| 11 |
|
| 12 |
class B { |
| 13 |
friend void A::f(); // { dg-error "context" } |
| 14 |
}; |