Why does C++ not allow inherited friendship?

前端 未结 10 1585
终归单人心
终归单人心 2020-11-28 04:11

Why is friendship not at least optionally inheritable in C++? I understand transitivity and reflexivity being forbidden for obvious reasons (I say this only to head off sim

10条回答
  •  醉话见心
    2020-11-28 04:52

    Why is friendship not at least optionally inheritable in C++?

    I think that the answer to your first question is in this question: "Do your father's friends have access to your privates?"

提交回复
热议问题