- Guidance for return values (prefer return by value, return by
reference, then return by pointer in that order)
- Mandate curly braces around the body of a control statement,
providing one exception for historical reasons (`if` with no `else`,
and `if` + body fits completely in a single line or the `if` fits in
one line and the body fits in another separate line).
- add section for inclusive language.
- move include-what-you-use to a new section.
- clarify usage of absl::optional for by-value vs by-reference params.
- document usage of `` as a code-indexing hint
- note that enclosing identifiers in `` can help code indexers.
Major changes:
- discourage const references when the input parameter must outlive the
call
- drop ban on mutable references
- allow rvalue-qualified methods in certain situations
- allow C-style cast when casting to void
- disallow postfix increment/decrement operators unless postfix
semantics are required
- allow designated initializers in C++20-compliant form
- disallow macro-style naming for enumerator constant for new code
- disallow spaces inside parentheses for conditionals
The change itself is largely automated, with a few manual adjustments:
- manually restore the TOC placeholder
- removed trailing whitespace