class A1 { public: friend class B; } class A2 { private: friend class B; }
Any difference?
No, access specificators have no effect on friend declaration.
friend