Re:Breaking all the Eggs in C++ (2015)
by Figs on Tuesday January 01, 2019 @11:23AM
(#18800734)
> Just replace the use of ++ with an assignment from true.
You can't just replace it with assignment to true directly as postfix ++ evaluates to the unmodified value; you actually need to replace b++ with something like (b?true:(b=true,false)) to avoid breaking code that uses b++ in an expression. That seems significantly uglier than just allowing b++ to continue to exist though...
You can't just replace it with assignment to true directly as postfix ++ evaluates to the unmodified value; you actually need to replace b++ with something like (b?true:(b=true,false)) to avoid breaking code that uses b++ in an expression. That seems significantly uglier than just allowing b++ to continue to exist though...