[Development] Coding style for lambdas, particularly their open-brace
Konstantin Tokarev
annulen at yandex.ru
Fri Aug 18 14:20:11 CEST 2017
18.08.2017, 15:17, "Edward Welbourne" <edward.welbourne at qt.io>:
> Hi all,
>
> We have a draft policy for lambdas at [0], in a section that begins with
>
> Note: This section is not an accepted convention yet.
> This section serves as baseline for further discussions.
>
> That section is now a quarter decade old; it's had a few updates since
> it was added (2015-02-27), so may fairly be said to be evolving (albeit
> it's had more formatting changes than substantive ones); but perhaps
> it's about time we agreed that at least its low-level bits about
> formatting can be promoted to [1], without such a caveat.
>
> * [0] https://wiki.qt.io/Coding_Conventions#Conventions_for_C.2B.2B11_usage
> * [1] https://wiki.qt.io/Qt_Coding_Style#Braces
>
> In particular, I'd like to (at least) amend the first exception in [1],
>
> Function implementations and class declarations always have the left
> brace on the start of a line:
>
> to include "(but not lambdas)" in a judicious place, so that lambdas are
> excluded from the exception and fit into our general pattern, putting
> the open-brace on the same line as its controlling preamble: e.g.
>
> Function implementations (but not lambdas) and class declarations
> always have the left brace on the start of a line:
+1
>
> Does anyone object to this minimal change ?
> (How long do I have to wait before I can claim lazy consensus ?)
>
> Eddy.
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development
--
Regards,
Konstantin
More information about the Development
mailing list