3 ms·
You can override the postfix increment operator as well. The argument I've heard for why in C++ prefix is preferred is that compilers have a harder time optimi
by jstimpfle 7y ago
You can override the postfix increment operator as well.
The argument I've heard for why in C++ prefix is preferred is that compilers have a harder time optimizing out the temporary object cruft (especially older compilers).
- WalterBright 7y ago> You can override the postfix increment operator as well. You can, but if there are side effects in the object's implementation then it can be less efficient.