[Nfd-dev] C++11 code style
Junxiao Shi
shijunxiao at email.arizona.edu
Sun Nov 2 09:20:02 PST 2014
Dear folks
We need to define some new code style rules for C++11 syntax.
I'd start with three new rules:
rule x. Range-based for should be in the following form:
for (auto i : range) {
statements;
}
rule x. Lambda expression should be in the following form:
[&capture1, capture2] (Type1 arg1, Type2 arg2)
{
statements;
}
If the function body has only one line, and the whole expression can fit in
one line, the following form is also acceptable:
[&capture1, capture2] (Type1 arg1, Type2 arg2) { statement; }
rule x. `auto` type should only be used for local variables.
What other rules do we need?
Yours, Junxiao
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/nfd-dev/attachments/20141102/71a95848/attachment.html>
More information about the Nfd-dev
mailing list