cplusplus-modern
Modern C++ (C++20/23), RAII memory management, smart pointers, move semantics, and concepts.
SKILL.mdskills/cplusplus-modern/SKILL.md
GitHubModern C++ Protocol
Write memory-safe, high-speed C++ software.
1. RAII & Smart Pointers
- Manage resource lifecycles with RAII.
- Prefer
std::unique_ptrfor exclusive ownership andstd::shared_ptronly when shared ownership is mandatory. Avoid rawnewanddelete.
2. Move Semantics & Concepts
Use std::move to avoid expensive deep copies. Constrain templates with C++20 concepts for clear compiler diagnostics.