Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


#ActualÁlvaro

Posted 22 January 2013 - 02:40 PM

This is just convention [...]
Conventions are important. The standard lets you have an operator + that modifies its operands, overload operator comma (,) and many other horrible things that will confuse the hell out of anybody reading your code. Trying to minimize surprises for anyone reading your code is a very good thing to do, and returning a reference from operator= goes well with that philosophy.

#1Álvaro

Posted 22 January 2013 - 02:39 PM

This is just convention [...]

Conventions are important. The standard allows you to have operator + modify its operands, overload operator comma (,) and many other horrible things that will confuse the hell out of anybody reading your code. Trying to minimize surprises for anyone reading your code is a very good thing to do, and returning a reference from operator= goes well with that philosophy.

PARTNERS