When should you use 'friend' in C++?

前端 未结 30 2179
孤街浪徒
孤街浪徒 2020-11-22 10:12

I have been reading through the C++ FAQ and was curious about the friend declaration. I personally have never used it, however I am interested in exploring the language.

30条回答
  •  夕颜
    夕颜 (楼主)
    2020-11-22 10:43

    I found handy place to use friend access: Unittest of private functions.

提交回复
热议问题