title: Implicitly-defined copy assignment operator
body: <pre><code>class B
  {
  public:
      B(int&amp; a) :ref(a){}
      B(B const&amp;) = default;
      int&amp; ref;
  };
  
  
  void main()
  {
      int a1 = 1, a2 = 2;
      B b1(a1), b2(b1), b3(a2);
      b3 = b1;
  
  }
  </code></pre>
  
  <p>If the implicitly-defined copy assignment operator of compiler's implementation is,</p>
  
  <pre><code>B&amp; operator=(const B&amp; rhs)
  {
      this-&gt;ref = rhs.ref;
      return *this;
  }
  </code></pre>
  
  <p>why cannot be generated for references? The initial alias bounding to variable a is not affected, because in the copy assignment operator the numeric value of reference variable ref is altered.</p>