Originally Posted by
mickey
hello,
speaking again about overloading I'm reading "thinking in c++" (online version) and at p507 "Return by value as const" I see when I have to use 'const' keys while overloading. In particular, I've noticed that when I do f(a+b) when f take a value and '+' is overloaded, there's no reason to do 'const' the returned value of operator+: this because the call of 'f' will do 'a+b' automatically 'const' (because a temporary object is a 'const'); probabily I lost something before in the book: what does mean the Bold ?
Thank you