Commit Graph

24 Commits

Author SHA1 Message Date
Daniel Cheng
4e25657924 Update C++ style guide.
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.
2021-03-26 16:54:25 -07:00
Daniel Cheng
a4413633ec Update C++ style guide.
Minor formatting and wording fixes.
2021-01-29 11:04:19 -08:00
Daniel Cheng
ed3dd33df3 Update Google C++ styleguide
- 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).
2020-11-10 22:26:05 -08:00
Daniel Cheng
3919c347aa Update C++ styleguide
- 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.
2020-09-25 00:29:52 -07:00
Daniel Cheng
d8467c6dcf [C++ styleguide] Restore table of contents
This was mistakenly dropped when updating the styleguide from the
internal C++ styleguide.
2020-05-27 01:07:22 +00:00
Daniel Cheng
7a7a2f510e Update C++ styleguide
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
2020-05-20 17:14:04 +00:00
Victor Costan
967e157a00 Update C++ style guide for C++17. 2019-09-05 05:09:38 -07:00
Victor Costan
f0314ea7e0 Update C++ style guide. 2019-09-01 21:07:27 -07:00
Tom Manshreck
63107a12eb
Update cppguide.html 2018-08-14 16:12:59 -04:00
Victor Costan
b89a775fa7 Update C++ style guide 2018-08-02 15:54:34 -07:00
Victor Costan
4b9c0c0389 Minor updates to C++ style guide. 2018-02-21 05:44:55 -08:00
Victor Costan
6dfd9d9de9 Update C++ styleguide to revision 3.277. 2018-02-07 12:42:22 -08:00
Ted Osborne
505ba68c74 Revert "Project import generated by Copybara."
This reverts commit 54cca78d64.
2018-01-30 12:36:50 -05:00
Google Python team
54cca78d64 Project import generated by Copybara.
PiperOrigin-RevId: 179577576
2018-01-30 12:10:03 -05:00
roooooooot
a33bdd6e3a Fix a typo
requre -> require
2016-12-31 13:10:07 +08:00
Stephen Hicks
db0a26320f Update Java and C++ style guides with various changes since the last update. 2016-11-17 18:02:44 -08:00
Titus Winters
f15e633de5 Update to current.
This notably includes changes for namespace naming and use of auto, as
well as clarification on when comments are necessary and attribute
placement.
2016-07-06 12:12:21 -04:00
Ackermann Yuriy
7969290bac Replaced HTTP where HTTPS been awailable. 2016-04-01 21:41:34 +13:00
Alan Yee
04b42100ea Grammar fix
Replaced "less" with "fewer"
2016-03-01 13:49:01 -08:00
Titus Winters
0124f309e4 Update to current.
Most significant updates:
* Casting (for arithmetic types, maybe use {}s)
* Namespaces
* Aliases
2016-01-06 16:09:22 -05:00
Mark Mentovai
14ab228ab6 Restore missing newline 2016-01-04 10:49:37 -05:00
Roman Franchuk
7e0bcd7e29 Fix links in C++ guide to point to GitHub
The links were pointing to googlecode.com. Two of them resulted in "404
Not Found", one resulted in the message "the project is moved".
2015-11-01 12:52:05 +02:00
Geoff Romer
3591b2e540 Update C++ Style Guide to 4.177. 2015-09-11 15:09:00 -07:00
mark@chromium.org
3ed10fb207 Update C++ style guide to 4.45.
Much of the guide has been refactored, rewritten, and revised.
2014-09-08 17:01:51 +00:00