title: cannot call base class protected functions?
body: <p>I cant call protected function in my base class. Why? It looks something like this:</p>
  
  <pre><code>class B : B2
  {
  public:
    virtual f1(B*)=0;
  protected:
    virtual f2(B*) { codehere(); }
  }
  class D : public B
  {
  public:
    virtual f1(B*b) { return f2(b); }
  protected:
    virtual f2(B*b) { return b-&gt;f2(this); }
  }
  </code></pre>
  
  <p>In msvc I get the error error C2248: 'name::class::f2' : cannot access protected member declared in class 'name::class'</p>
  
  <p>In gcc I get error: 'virtual int name::class::f2()' is protected.</p>
  
  <p>Why is that? I thought the point of protected members is for derived classes to call.</p>