The C++ Core Guidelines is a collaborative set of coding guidelines, rules, and best practices for writing modern C++.
The guidelines address the challenge of using C++ safely and effectively by establishing principles for higher-level design concerns including interfaces, resource management, memory management, and concurrency. The approach emphasizes that following these rules leads to code that is statically type-safe, has no resource leaks, and catches more programming logic errors than typical code while maintaining performance. The guidelines focus on what modern C++ code should look like five to ten years forward, starting from C++11 and newer standards. They are intentionally kept simple in ASCII-compatible Markdown to support automatic post-processing such as language translation and reformatting.
Developers should adopt these guidelines if they want to modernize C++ codebases or establish consistent coding standards across teams and organizations. The guidelines suit projects of any scale and can be freely copied and modified to meet specific organizational needs. They are designed to be introduced gradually into existing codebases rather than requiring wholesale rewrites. The guidelines are less concerned with low-level style issues like naming conventions and indentation, focusing instead on architectural and design patterns that have measurable safety and correctness benefits. Many guidelines reference the Guidelines Support Library, a header-only utility library that provides implementations supporting the recommended practices.
The guidelines document evolves continuously without a strict release schedule, with Bjarne Stroustrup periodically reviewing and versioning the content. The repository maintains both a master branch with the latest changes and a separately formatted browsable version that may lag slightly behind. The project welcomes verification, disproof, and measurement-backed evidence for its rules, explicitly acknowledging that some rules may be too strict and expecting refinement as real-world needs emerge. Contributors are encouraged to provide examples and data supporting or challenging the guidelines, indicating an openness to evidence-driven evolution of the standards.