15
class A1 { public: friend class B; }
class A2 { private: friend class B; }

Any difference?

Kyle
  • 4,487
  • 3
  • 29
  • 45
  • 4
    possible duplicate of [Friend declaration in C++ - difference between public and private](http://stackoverflow.com/questions/6407691/friend-declaration-in-c-difference-between-public-and-private) – Pokechu22 Jun 21 '15 at 16:52

1 Answers1

18

No, access specificators have no effect on friend declaration.

M. Williams
  • 4,945
  • 2
  • 26
  • 27