[Development] commas in ctor-init-lists

Denis Shienkov denis.shienkov at gmail.com
Fri Jun 3 10:15:39 CEST 2016


Hi all,

my personal opinion: e.g. I prefer a commas *before* the variable in 
ctor, because it simplifies editing of a code.

e.g.

{code}

Foo::Foo()

     : a,

       b,

       c

{code}

when I need to remove the 'c' variable, I need to remove and the ',' 
after 'b' too.

{code}

Foo::Foo()

     : a

     ,  b

    ,  c

{code}

but here I need to remove only whole line ',c' .. :)


Besides, it is consistent with :

{code}

int sum = a

     + b

     + c;


bool result = a

     || b

     || c;

{code}


BR,

Denis




More information about the Development mailing list