struct A{};
struct Ader : A{};
struct B{
friend struct A;
};
No. Friendship is not inherited in C ++. It is also not transitive.
Adercannot access Bas a friend unless explicitly indicated by friendship on B, simply because the base Ais a friend B.
source
share