title: C++ Return value, reference, const reference
body: <p>Can you explain to me the difference between returning value, reference to value, and const reference to value?</p>
  
  <p><strong>Value:</strong></p>
  
  <pre><code>Vector2D operator += (const Vector2D&amp; vector)
  {
      this-&gt;x += vector.x;
      this-&gt;y += vector.y;
      return *this;
  }
  </code></pre>
  
  <p><strong>Not-const reference:</strong></p>
  
  <pre><code>Vector2D&amp; operator += (const Vector2D&amp; vector)
  {
      this-&gt;x += vector.x;
      this-&gt;y += vector.y;
      return *this;
  }
  </code></pre>
  
  <p><strong>Const reference:</strong></p>
  
  <pre><code>const Vector2D&amp; operator += (const Vector2D&amp; vector)
  {
      this-&gt;x += vector.x;
      this-&gt;y += vector.y;
      return *this;
  }
  </code></pre>
  
  <p>What is the benefit of this? I understand the sense behind const reference passing to function as you want to make sure not to modify this value on which reference is pointing to inside a the function. But I'm confused by the meaning of returning const reference. Why returning of reference is better than returning of value, and why returning of const reference is better than returning of not-const reference?</p>