B
bart.c
(Explanation of (a|b|c) vs. a?b:c got edited out)
That works fine (it's exactly what I use internally to implement my
example). Makes you wonder what the fuss over just having a?b:c directly as
an lvalue is all about. After all we aren't obliged to write *(&a)=b.
*(condition ? &variable1 : &variable2) = value;
is no so very far from what you want. The optimiser will probably be
able to do away with the * and both the &s.
That works fine (it's exactly what I use internally to implement my
example). Makes you wonder what the fuss over just having a?b:c directly as
an lvalue is all about. After all we aren't obliged to write *(&a)=b.