Hacker News new | ask | show | jobs
by danellis 3237 days ago
I think in C the temporary will be optimized away.

I keep meaning to test this in C++. I presume that it would for fundamental types, but wouldn't be able to be objects, because the side effects of that operation could be in another module. I use ++i for C++ iterators for that reason, and the habit tends to spill over to C.