- Include friend types in class declaration order guidance.
- Include previously omitted text (due to mismatched tags) about
preferring int16_t over short, et cetera.
- Function declarations:
- Updated guidance for what comments should cover.
- Add a C++ attribute example.
- Reword guidance for definitions of inline functions and templates.
- Capitalize the first letter of various comments.
- Update command-line flag reference to use absl flags.
- Improve braced-initialization example for 64-bit constants.
- Delete C++03 guidance for NULL.
- Clarify wording around wrapping of string literals.
- Use C++17 [[fallthrough]] instead of ABSL_FALLTHROUGH.
- Recommend the use of absl::implicit_cast for safe upcasting.
- Remove std::hash guidance
- Remove end-of-line comment guidance
- Remove "consistency to local style" guidance
- Miscellaneous wording updates
Mostly minor wording updates (e.g. preferring int64_t to int64). The
most significant change is clarifying the section on consistency to
clarify that consistency, in and of itself, should not be used as the
sole argument for blocking adoption of style changes.
- 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