Re:C++: Return value optimization vs. std::move
by abhishekkr on Monday July 20, 2015 @12:39PM
(#9917204)
You can actually just do
return big_object_ptr;
Instead of the std::move.
The compiler will complain if it can't do RVO because unique_ptr prohibits a copy, so you're safe :)
[ Parent
| on HN ]
There are no comments on this comment yet.