Comment Re:Build-in function library (Score 1) 831
There is no need to ANY copy to implement that on a well made compile. Move stack pointer (faster and cleaner than a NEW), execute constructor code (equaly necessary on both cases), call the method bar using that stack address as this pointer and with parameter someotherarg.
The copy could arise if you return as COPY form the bar method something whose constructor is not trivial and have side effects. Returning anything complex by copy is by itself a bad practice in C++. Do not write code that needs to return anything complex by copy.
That is why I said, C++ suck when you use the WRONG mentality alongside it. If you think and use it as it was supposed to be used... no issues .