On Mon, 24 Mar 2014 02:50:17 -0000, Adam D. Ruppe <[email protected]> wrote:
int a = something == 1 ? 1
       : something == 2 ? 2
       : (assert(0), 0);

FWIW I personally find this kind of code horrid.  I would re-write to:

assert  (something == 1 || something == 2);
int a = (something == 1 || something == 2) ? something : 0;

R

--
Using Opera's revolutionary email client: http://www.opera.com/mail/

Reply via email to