cpp
Google C++ Style Guide
Official Google C++ coding standards for consistent, maintainable code.
Golden Rules
- Target C++20 — avoid non-standard extensions
- 80-character line limit — for readability
- 2-space indentation — no tabs
- Use
constliberally — for correctness and thread safety - Avoid exceptions — Google code doesn't use C++ exceptions
- Smart pointers for ownership —
std::unique_ptrandstd::shared_ptr - Header guards — use
PROJECT_PATH_FILE_H_format
Quick Reference
Naming Conventions
| Element | Convention | Example |
More from testdino-hq/google-styleguides-skills
google-styleguides-skills
Complete collection of Google's official style guides for 17 languages. Includes TypeScript, JavaScript, Python, Java, Go, C++, C#, Swift, Objective-C, HTML/CSS, AngularJS, Shell, R, Common Lisp, Vim Script, JSON, and Markdown. Production-ready coding standards used across Google's engineering organization, formatted for AI agent consumption.
4shell
Google's official Shell scripting style guide. Covers Bash scripting, naming conventions, error handling, portability, and shell best practices.
3python
Google's official Python style guide extending PEP 8. Covers type annotations, Google-style docstrings, imports, naming conventions, f-strings, comprehensions, and exception handling. Enforces 80-char line length and 4-space indentation.
3java
Google's official Java style guide. Covers 2-space indentation, 100-char line limit, naming conventions, braces, imports, Javadoc, exception handling, lambdas, and streams. Enforces @Override annotations and specific imports.
2go
Google's official Go style guide. Covers gofmt formatting, naming conventions, error handling, interfaces, concurrency patterns, and package organization. Enforces idiomatic Go code with short variable names and explicit error checks.
1typescript
Google's official TypeScript style guide. Covers strict mode, type annotations, interfaces vs types, null handling, naming conventions, imports, and common mistakes. Enforces explicit return types, readonly properties, and avoidance of any/non-null assertions.
1