title: Assignment operator and copy constructor in the presence of references
body: <p>I am just experimenting with the references using this code:</p>
  
  <pre><code>class A
  {
  };
  
  class B
  {
  public:
      B(A&amp; a): m_a(a){}
  
      A&amp; m_a;
  };
  
  int main()
  {
      A a;
      B b(a);
      B b1 = b;
  }
  </code></pre>
  
  <p>I was expecting both <code>B b1 = b;</code> to produce a error. Instead when I compile with VS2008 I just get a warning  </p>
  
  <blockquote>
    <p>warning C4512: 'B' : assignment
    operator could not be generated</p>
  </blockquote>
  
  <p>I understand why I am getting this warning. But shouldn't the compiler generating an error for the <code>B b1 = b;</code> statement too? It is like it generated copy constructor but didn't generate assignment operator. Aren't these two inherently linked to one another ? does it makes sense to generate the default implementation for only one of them when the other could not be generated?</p>