Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • It won't be moved if the foo it returns is perhaps a foo with static storage duration. There's probably some other cases too. But yes, I agree with you for the case that the asker is probably asking about. Commented Feb 25, 2013 at 19:07
  • 1
    @sftrabbit: OK, that's correct. I assumed that he wanted to returned a local object with automatic storage. Edited, thank you. Commented Feb 25, 2013 at 19:11
  • @BoPersson: I did mention that, although not RVO explicitly. I will do it. Commented Feb 25, 2013 at 19:11