I am aware that according to the standard, fun(++a, a) should be avoided since second argument is not well defined.
However, is this formulation safe:
(++a ? a : 10);
I tested this snippet and it works as expected, ie for a = -1 it evaluates as 10, and for any other a it evaluates as a+1. Is this well defined in the standard, or it strongly depends on the compiler?