3 ms·
Right, and on a good day you might get named return value optimization. http://msdn.microsoft.com/en-us/library/ms364057(v=vs.80).aspx http://msdn.microsoft.co
by xyzzy123 13y ago
Right, and on a good day you might get named return value optimization.
http://msdn.microsoft.com/en-us/library/ms364057(v=vs.80).aspx http://msdn.microsoft.com/en-us/library/ms364057(v=vs.80).as...
If the compiler can figure out what you're doing, the huge_object you declared can be aliased to an object in the caller's stack frame which results in no copies or moves at all.
- tqh 13y agoAh thanks for clearing that up. It's in a newer (C++03?) standard. I still have to deal with gcc 2.95 on a regular basis so I'm stuck in the old ways. I guess that is why the title was 'Modern C++'.