News for hackers. Stuff that matters.
Re:Is C/C++ worth it? by alexkcd on Monday July 23, 2012 @09:12PM (#4283834)
All modern C++ compilers support RVO, so there will be no copy given how this function is implemented. If by "safer" you mean "probably faster", then that's not true: http://cpp-next.com/archive/2009/08/want-speed-pass-by-value...

The author's version is more idiomatic modern C++, while your version is something you'd write for a decade old compiler.

There are no comments on this comment yet.