Re:C++ is faster and safer than Rust (2020)
by makapuf on Friday October 08, 2021 @01:26AM
(#28796027)
That's what I meant with operator++ being redefined to do anything.
Re:C++ is faster and safer than Rust (2020)
by jcelerier on Friday October 08, 2021 @07:34AM
(#28798055)
but when you write generic algorithms (as you should), you don't know beforehand with which "operator++" your a will be called. So you have to go for the one which will give the best performance.
++godobject will simply increment that value.
godobject++ will make a copy of that object, returning it to you along with allocating another 50MB pool, purely to increment the value.