| 1 |
template <class Derived> |
| 2 |
struct base { |
| 3 |
friend void bar(Derived& d) { |
| 4 |
d.bar(); // access in inline friend of friend, ok? |
| 5 |
} |
| 6 |
}; |
| 7 |
|
| 8 |
class derived : base<derived> { |
| 9 |
friend class base<derived>; |
| 10 |
void bar() {} |
| 11 |
}; |
| 12 |
|
| 13 |
int main() { |
| 14 |
derived d; |
| 15 |
bar(d); |
| 16 |
} |
| 17 |
|