On Friday, December 09, 2011 12:36:25 Regan Heath wrote:
> On Fri, 09 Dec 2011 11:39:55 -0000, Timon Gehr <timon.g...@gmx.ch> wrote:
> > These are the occurences of the comma operator in directory 'std':
> Here is my /very/ quick re-write of each without looking at the context of
> each snippet. There may be much better re-writes in context. Re-writing
> this was problematic /because/ the comma operator makes things that much
> more confusing to me. Especially example #5 below where the last ,
> actually separates enforce parameters!
> 
> 1)
> 
> > return r2.empty ? (r1 = r, true) : false;
> 
> if (!r2.empty) return false;
> r1 = r;
> return true;

Actually, that particular usage of the comma operator makes me almost want to 
use it that way. It manages to take one of the type of statements that always 
irritates me when it's multiple lines and make it a single line.

- Jonathan M Davis

Reply via email to