Hacker News new | ask | show | jobs
by woud420 2627 days ago
Yes RVO is one case where the compiler will do it automatically.

I think copy initialization of an object will have the same will apply copy elision as well to result in the same performance, but I'm not entirely sure.