Update C++ style guide One small update to clarify that omitting braces on control blocks is permitted but discouraged.
diff --git a/cppguide.html b/cppguide.html index c5c7b98..9e849cc 100644 --- a/cppguide.html +++ b/cppguide.html
@@ -5557,12 +5557,12 @@ DoSomething(); </pre> -<p>For historical reasons, we allow one exception to the above rules: the curly -braces for the controlled statement or the line breaks inside the curly braces -may be omitted if as a result the entire statement appears on either a single -line (in which case there is a space between the closing parenthesis and the -controlled statement) or on two lines (in which case there is a line break -after the closing parenthesis and there are no braces).</p> +<p>For historical reasons, we allow, but discourage, one exception to the above +rules: the curly braces for the controlled statement or the line breaks inside +the curly braces may be omitted if as a result the entire statement appears on +either a single line (in which case there is a space between the closing +parenthesis and the controlled statement) or on two lines (in which case there +is a line break after the closing parenthesis and there are no braces).</p> <pre class="neutralcode">// OK - fits on one line. if (x == kFoo) { return new Foo(); }