来自 C++ Primer 5th edition:
看看这些类:  
class Base {
    friend class Pal;
public:
    void pub_mem();
protected:
    int prot_mem;
private:
    int priv_mem;
};
class Sneaky : public Base {
private:
    int j;
};
class Pal {
public:
    int f1(Base b){
        return b.prot_mem;  //OK, Pal is friend class
    }
    int f2(Sneaky s){
        return s.j;  //error: Pal not friend, j is private
    }
    int f3(Sneaky s){
        return s.prot_mem; //ok Pal is friend
    }
}
这里的 Pal 是 Base 的友元类,而 Sneaky 继承自 Base 并在 Pal 中使用。现在最后一行s.prot_mem被调用,作者给出了它工作的原因,因为 Pal 是 Base 的友元类。但是到目前为止,我的理解告诉我它应该可以正常工作,因为 s 派生自 Base 而 prot_mem 是 Base Class 的受保护成员,它应该已经可以访问 Sneaky,你能解释一下为什么我错了或者更详细请?