Hacker News new | ask | show | jobs
by abhishekkr 3991 days 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 :)