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

Reply via email to