Install any skill in seconds. Free to start, no credit card required.
Get Started Free →xu-xiang/cpp-coding-standards
基于 C++ 核心指南 (isocpp.github.io) 的 C++ 编码规范。在编写、评审或重构 C++ 代码时使用,以强制执行现代、安全且地道的实践。
Passed 18 of 22 test cases with the skill, and 17 of 22 without it.
2 fixed16 passed either way3 still failing1 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 2 test cases the skill fixed. Same model, same prompt, with and without the skill.
I am designing a C++ interface hierarchy for an abstract graphics shape engine (`Shape` base class, `Circle` derived class). How should the base class destructor and copy/move operations be defined?
| Checked | Without skill | With skill |
|---|---|---|
| The base class destructor is declared as virtual or protected non-virtual. | Passed | Passed |
| Copy and move operations on the polymorphic base class are deleted. | Missed | Passed |
The instructions your model reads when the skill loads.
源自 C++ 核心指南 (C++ Core Guidelines) 的现代 C++ (C++17/20/23) 综合编码规范。强制执行类型安全 (Type safety)、资源安全 (Resource safety)、不变性 (Immutability) 和清晰度。
enum vs enum class,原始指针 vs 智能指针)以下主题贯穿整个指南并构成基础:
const/constexpr;可变性应当是例外。不变性 (Immutability)| 规则 | 摘要 |
|---|---|
| P.1 | 直接在代码中表达思想 |
| P.3 | 表达意图 |
| P.4 | 理想情况下,程序应该是静态类型安全的 |
| P.5 | 优先考虑编译时检查而非运行时检查 |
| P.8 | 不要泄露任何资源 |
test cases passed, vs 17 / 22 without
Published skills whose descriptions closely match this one, with their headline benchmark lift.
More skills from the same source and nearby in the registry, with their headline benchmark lift.