> The leading comma's are also helpful if we have some part of the
> initializer list protected by a preprocessor conditional (or might be
> needed in the future).

This is right.
This is what CLangFormat proposed me by default.
I thought is was a bit strange when I started to use this, but now I
would not change.

Philippe

On Wed, 1 Jun 2016 16:10:34 -0700
Mandeep Sandhu <mandeepsandhu....@gmail.com> wrote:

> The leading comma's are also helpful if we have some part of the
> initializer list protected by a preprocessor conditional (or might be
> needed in the future).
> 
> QFoo::QFoo()
>   : QBase()
>   , m_f1()
> #ifdef XYZ
>   , m_f2()
> #endif
>   , m_f3()
> 
> Although I'm not sure if we have many (of any at all) such instances
> in the Qt source.
> 
> But this form does take some getting used to. My natural tendency is
> to put the comma at the end.
> 
> Just my 2¢.
> 
> -mandeep
> _______________________________________________
> Development mailing list
> Development@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development


_______________________________________________
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to