Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
abhishekkr
on July 20, 2015
|
parent
|
context
|
favorite
| on:
C++: Return value optimization vs. std::move
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 :)
Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: