cppbestpractices
Collaborative Collection of C++ Best Practices. This online resource is part of Jason Turner's collection of C++ Best Practices resources. See README.md for more information.
A community-written reference guide covering agreed-upon best practices for writing correct, readable, and maintainable C++ code, spanning style, tooling, testing, safety, and build choices.
This repository is a collaboratively written guide to best practices for C++ programming. C++ is a widely used systems programming language that gives developers a lot of control but also a lot of rope to make mistakes. This guide aims to collect agreed-upon advice for writing C++ code that is correct, readable, and maintainable.
The project was started and is maintained by Jason Turner, who also produces a related book, a YouTube channel focused on C++ topics, a starter project template for C++ and CMake, and an O'Reilly video course. The GitHub repository is the community-editable home of the written guide, which lives as a series of Markdown files in the repository. A preface document describes the project's goals and approach in more detail.
The README itself is brief and mostly points to external companion resources rather than summarizing the content of the guide. The actual advice and recommendations are spread across linked files within the repository rather than in the README. Based on the project description, the guide is structured as a reference for C++ developers of varying experience levels, covering topics like code style, tooling choices, testing, safety, and build practices.
This is a reference document rather than software you install or run. If you are learning C++ or working on a C++ codebase and want community-reviewed guidance on how to approach common decisions, this guide is the kind of resource you would read through and return to as questions come up.
Where it fits
- Review community-vetted guidance on C++ code style, tooling, and build practices before starting a new project.
- Use as a reference when making decisions about testing frameworks, static analysis tools, or compiler flags in a C++ codebase.
- Share with a team as a foundation for agreeing on coding standards and code review criteria.
- Learn from experienced C++ practitioners which patterns to avoid and which idioms are considered safe.