C++ friend inheritance?

前端 未结 4 1967
野趣味
野趣味 2020-12-14 14:22

Does a subclass inherit, the main class\' friend associations (both the main class\' own and other classes friended with the main class)?

Or to put it differently, h

4条回答
  •  渐次进展
    2020-12-14 15:17

    friend only applies to the class you explicitly make it friend and no other class.

    http://www.parashift.com/c++-faq-lite/friends.html#faq-14.4

提交回复
热议问题