title: Why does Eclipse-CDT say self-assignment is an error?
body: <p>I was doing unit test in eclipse g++ using google test. I got an error when i tried to unit test the self assignment check in the class i designed.</p>
  
  <p>as usual, the overload is pretty standard and looks like this:</p>
  
  <pre><code>CLASS operator=(const CLASS&amp; rhs);
  </code></pre>
  
  <p>and when i tried to have this in the test:</p>
  
  <pre><code>CLASS A;
  A = A;   //compile error here, saying self assignment to itself. have no clue why, though.
  </code></pre>
  
  <p>I wonder if there is a specific way for self assignment test. Thanks.</p>
  
  <p>FYI, below is the snapshot of the error</p>
  
  <p><img src="https://i.stack.imgur.com/dyGSz.png" alt="enter image description here"></p>