title: Default assignment operator has access to private members of base class
body: <p>My problem is very easily explained by this example : </p>
  
  <p><a href="http://pastebin.com/VDBE3miY" rel="nofollow">http://pastebin.com/VDBE3miY</a></p>
  
  <pre><code>class Vector3
  {
    float                   _x;
    float                   _y;
    float                   _z;
  
  public :
   /// constructors and stuff
  
  };
  
  class Point : public Vector3
  {
  // some BS
    Point(float _x):Vector3(float _x)
    {}
  };
  
  main()
  {
     Point aPoint(3);
     Point anotherPoint(4);
  
     // WHY DOES THIS WORK and copy _x,_y &amp; _z properly
     aPoint = anotherPoint;
  }
  </code></pre>
  
  <p>Basically, I am at a loss to understand why the <code>=</code> for the derived class can copy <code>_x</code>, <code>_y</code> and <code>_z</code>, even though it shouldn't have access to them since they are private.</p>