Vect, I don't think you really want to be in a group of losers that have no grasp on reality.
(n+5)++
is bunk, since the ++ only works on
lvalues -- meaning something you can meaningly modify (like a variable).
n++
is meaningful.
5++
is not.
(2 + 5)++
is not.
(n + 5)++
is not.
(n += 5)++
may or
may not, depending on how ancient and derelict your compiler is.
Remember, ++ implies that the operand is
modifiable and
retrievable. Calculated values fail on the second point. (They are calculated in the processor's registers, copied elsewhere, and then forgotten -- register values are not preserved after the calculation is completed and are likely to be obliterated with the very next operation.)
Here is a real-world example where this very same failure caught someone by surprise:
http://groups.google.com.bz/group/comp.lang.c/msg/bde1c31e563e26c3
As for expressions with stuff like
++n + n++
, the language does not guarantee that anything reasonable happens. If
n were zero at the beginning of that expression, you might get -59213 as a valid result. (Presuming your compiler didn't complain when attempting to compile it.) Again:
http://www.parashift.com/c++-faq-lite/misc-technical-issues.html#faq-39.15
Hope this helps.