What problem does it solve?
Provides a concise, actionable distillation of the C++ Core Guidelines to help developers write, review, and refactor C++ code that is safer, clearer, and easier to maintain. It reduces defects caused by resource mismanagement, unsafe type usage, inconsistent APIs, and unclear ownership semantics.
Core Features & Use Cases
- RAII & Resource Safety: Guidance to bind resource lifetimes to object lifetimes and prefer smart pointers over raw ownership.
- Immutability & Type Safety: Rules to favor const/constexpr, strong typing, and enum class to catch errors at compile time.
- APIs, Classes & Templates: Best practices for interfaces, Rule of Zero/Five, explicit constructors, constrained templates, and clear naming conventions.
- Concurrency & Performance: Patterns for safe locking, avoiding data races, and making performance decisions based on measurement.
- Use Case: Use this guide to perform a code review of a C++17/20/23 pull request and produce a prioritized checklist of violations and fixes.
Quick Start
Use the cpp-coding-standards skill to review a C++ file and produce a checklist of guideline violations with suggested corrections.