Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Isn't it kind of confusing that RVO is mandatory, but it turns out RVO only refers to unnamed RVO and not NRVO? I would've thought that since NRVO is a type of RVO...

Thanks for the clarification. Clang does do NRVO in that case but I guess it's obviously not guaranteed by the standard.



Yes, I believe that explicitly qualifying unnamed and named rvo should be the norm and would clarify a lot of confusion on these topics.

I guess it makes sense that an optimization that GCC is not able to do at all should not be part of the standard ; I'm pretty sure it should be possible to write cases that clang wouldn't be able to optimize either.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: