Modern C++: don't use f*cking pointers.
klmr.me
klmr.me
Most of the time when I type * in my own C++ code, what I mean is:
"hey! this is an in/out parameter!".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.