Are there any good places to get examples for the C++ Google Style Guide?
Sample Code with Examples for the C++ Google Style Guide?
Asked Answered
Do you plan to work at Google? –
Distance
Nope. The company I work for told me that these are pretty close to the standards that we're going to use for writing C++ code. –
Toile
FWIW, the Google C++ guides are not necessarily good for anybody else. They were designed for Google's purposes and situations. Just because Google is a highly successful high-tech company doesn't mean that what's good for it is good for everybody. –
Gingham
I pity you, C with Objects is certainly not a language I wish to work with. –
Nalda
@David Please tell this to my superiors. I have no choice in the matter. –
Toile
Google open sources a number of projects, most of which comply with their style guides:
- protocol buffers
- re2 - pcre regular expressions
- perf tools - multithreaded performance analysis tools
- gflags - command line flags
Search Google code for google projects, and you'll find a lot!
gflags is a mess regarding variable names -- snake and camel mixed up. –
Weaver
http://sites.google.com/a/chromium.org/dev/developers/coding-style http://src.chromium.org/viewvc/chrome/
The source code for Chrome should theoretically follow their standards :)
From the first page:
Chromium follows the Google C++ Style Guide unless an exception is listed below.
. So Chromium does not entirely follow the Google Style, therefore it's probably not the best reference code. –
Actinouranium © 2022 - 2024 — McMap. All rights reserved.