This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gcc-wwwdocs".
The branch, master has been updated
via 26e513cbcd050538bc40b8c53186024bdc2b413a (commit)
from 111b7b2cbf7269a060f9692a55353dfdf6fc0849 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 26e513cbcd050538bc40b8c53186024bdc2b413a
Author: Jason Merrill
There should be a space between the lambda-introducer and the parameter + list, if any.
+Lambdas that do not outlive their enclosing function should
+ typically use [&]
implicit capture.
+ +auto l = [&] (tree arg) { ... }; +
If a lambda does not fit on one line, the left brace should be indented like +the body of a for-statement.
+ ++ +auto l = [&] (tree arg) + { + ... + }; +
This also applies if the lambda is the last argument, and only lambda +argument, to a function.
+ ++ +To get the above behavior from + + GNU Emacs CC Mode, you can add this to yourstd::for_each (start, end, [&] (tree arg) + { + ... + }); +
.emacs
:
+
++ +(defun lambda-offset (elem) + "If the opening brace of a lambda is on a new line, indent it one step." + (if (assq 'inline-open c-syntactic-context) '+ 0)) +(add-hook 'c++-mode-hook + '(lambda () (c-set-offset 'inlambda 'lambda-offset))) +
If the multi-line lambda is not the last argument, or there are multiple
+lambda arguments, you are encouraged to make them local variables, as
+the l
examples above. If you do pass them directly, they should
+be indented like other parameters.
+
+
+ +my_algo (start, end, + [&] (tree arg) + { + thing one... + }, + [&] (tree arg) + { + thing two... + }); +
See also the + + GDB coding standards.
+Python scripts should follow PEP 8 – Style Guide for Python Code ----------------------------------------------------------------------- Summary of changes: htdocs/codingconventions.html | 60 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) hooks/post-receive -- gcc-wwwdocs