C++ Return value, reference, const reference
There is no difference unless you write something weird like In the first case, the assignment will be to a temporary, and the overall effect will be v1 += v2. In the second case, the assignment will be to v1, so the overall effect will be v1 = v3. In the third case, the assignment won’t be allowed. … Read more