Return value optimization in VC2008
2 answers
I wouldn't worry too much about these optimizations if I were you. Among other things, they are not portable.
If you are worried about writing efficient C ++ code, rule number one is to avoid copying at all. Make sure you use the link wherever possible, but don't try to use it where it is missing. After that, you sometimes need a new value - as a return value for implementations of the + () operator, for example.
+2
anon
a source
to share