Re:Modern C++ for C Programmers: part 5
by jcelerier on Wednesday July 25, 2018 @10:25AM
(#17609473)
No, C has much less RVO allowed than C++. I provided an example of this here the last time : https://news.ycombinator.com/item?id=17216250
[ Parent
| on HN ]
Re:Modern C++ for C Programmers: part 5
by stephencanon on Wednesday July 25, 2018 @12:11PM
(#17610357)
From what I can see, the example you list there is just a missed optimization in the C compilers you tested. It's absolutely allowed, and clang trunk is happy to do it in C-mode, for example.