title: Why calling a protected static method in derived classes is allowed?
body: <p>Invoking a protected constructor in a derived class is not allowed, as explained <a href="https://stackoverflow.com/questions/2393325/one-question-about-protected-constructor">here</a>.</p>
  
  <p>The accepted answer explains that <code>protected</code> grants access to members of an object of base class <code>A</code> only when that object of class <code>A</code> is a subobject of class <code>B</code>. So far, so good.</p>
  
  <p>But then, why is it allowed (at least in GCC 4.6.3) to call static protected methods? Specifically, it doesn't make any sense to me that the following compiles, while the commented line does not:</p>
  
  <pre><code>class A 
  {
  protected:
      A() {}
      static A makeA() { return A(); }
  };
  
  class B: public A
  {
  public:
      static A makeAFromB()
      {
          return makeA(); // compiles
          // return A();  // does not compile
      }
  };
  </code></pre>
  
  <p>Philosophically, a constructor is pretty much like a static method returning an object of class <code>A</code>, reason why I don't get the difference in behaviour here.</p>