It applies when you want to construct temporaries in the argument list, and these temporaries take one argument, where you pass a single identifier, or no argument. Then it is interpreted as a function taking arguments of the types of the temporaries, those arguments either unnamed or with the name you specified.

Wow, those are illegible sentences.

11-10-2008

Hussain Hani

for performance sake, dont return user-defined types by value. Instead make a free-operator function that takes three arguments like so

Code:

void func(Obj& returnValue, const Obj& obj1, const Obj& obj2);

11-10-2008

CornedBee

Bah.

First, prove to me that the return-by-value is an actual performance problem. Then you may introduce the uglification of the interface.

11-10-2008

Elysia

I concur with CornedBee. Many times the performance hit is negligible. And other times, it is even optimized away.