13

Are there any good places to get examples for the C++ Google Style Guide?

leeand00
  • 25,510
  • 39
  • 140
  • 297
  • 1
    Do you plan to work at Google? – fredoverflow Jun 17 '10 at 14:06
  • 1
    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. – leeand00 Jun 17 '10 at 14:08
  • 2
    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. – David Thornley Jun 17 '10 at 14:22
  • 4
    I pity you, C with Objects is certainly not a language I wish to work with. – Matthieu M. Jun 17 '10 at 14:34
  • 1
    @David Please tell this to my superiors. I have no choice in the matter. – leeand00 Jun 17 '10 at 14:43

2 Answers2

6

Google open sources a number of projects, most of which comply with their style guides:

Search Google code for google projects, and you'll find a lot!

Stephen
  • 47,994
  • 7
  • 61
  • 70
-1

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 :)

Stefan Valianu
  • 1,370
  • 2
  • 13
  • 24
  • 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. – MOnsDaR Aug 24 '20 at 11:14