3 ms·
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, s
by abhishekkr 11y ago
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 :)