<div dir="ltr">Dear folks<div><br></div><div>We need to define some new code style rules for C++11 syntax.</div><div><br></div><div>I'd start with three new rules:</div><div><br></div><div>rule x. Range-based for should be in the following form:</div><div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>for (auto i : range) {</div><div>  statements;</div><div>}</div></blockquote><div><br></div><div><br></div><div>rule x. Lambda expression should be in the following form:</div><div><br></div><div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>[&capture1, capture2] (Type1 arg1, Type2 arg2)</div><div>{</div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>  statements;</div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>}</div></blockquote></div><div><br></div><div>If the function body has only one line, and the whole expression can fit in one line, the following form is also acceptable:</div><div><br></div><div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>[&capture1, capture2] (Type1 arg1, Type2 arg2) { statement; }</div></blockquote></div><div><br></div><div><br></div><div>rule x. `auto` type should only be used for local variables.</div><div><br></div><div><br></div><div>What other rules do we need?</div><div><br></div><div>Yours, Junxiao</div></div>