title: Assignment operator inheritance
body: <p>There is this code:</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  class Base {
  public:
      Base(){
          std::cout &lt;&lt; "Constructor base" &lt;&lt; std::endl;
      }
      ~Base(){
          std::cout &lt;&lt; "Destructor base" &lt;&lt; std::endl;
      }
      Base&amp; operator=(const Base&amp; a){
          std::cout &lt;&lt; "Assignment base" &lt;&lt; std::endl;
      }
  };
  
  class Derived : public Base{
  public:
  
  };
  
  int main ( int argc, char **argv ) {
      Derived p;
      Derived p2;
      p2 = p;
      return 0;
  }
  </code></pre>
  
  <p>The output after compilation by g++ 4.6:</p>
  
  <pre><code>Constructor base
  Constructor base
  Assignment base
  Destructor base
  Destructor base
  </code></pre>
  
  <p>Why assignment operator of base class is called altough it is said that assignment operator is not inherited?</p>