Add modern-cpp plugin for C++20/23/26 best practices#142
Add modern-cpp plugin for C++20/23/26 best practices#142wizardengineer wants to merge 1 commit intomainfrom
Conversation
Modern C++ skill guiding Claude toward modern idioms with a security emphasis. Mirrors modern-python in spirit but focuses on language standards rather than toolchain. Features tiered by practical usability: - Tier 1 (Use Today): C++20/23 features with solid compiler support - Tier 2 (Deploy Now): Compiler hardening, sanitizers, hardened libc++ - Tier 3 (Plan For): C++26 reflection - Tier 4 (Watch): Contracts, std::execution Includes SKILL.md entry point + 6 reference docs: - anti-patterns.md (30+ legacy-to-modern swaps) - cpp20-features.md (concepts, ranges, span, format, coroutines) - cpp23-features.md (expected, print, deducing this, flat_map) - cpp26-features.md (reflection, contracts, memory safety) - compiler-hardening.md (flags, sanitizers, hardened libc++) - safe-idioms.md (security patterns by vulnerability class) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.
Tip: disable this comment in your organization's Code Review settings.
|
|
|
|
||
| - CPU-bound parallel work (coroutines cooperate, they don't parallelize) | ||
| - Simple synchronous code (unnecessary complexity) | ||
| - Writing the low-level promise_type / awaiter machinery from scratch (use library types) |
There was a problem hiding this comment.
I would argue that sometimes writing custom awaiters specifically is required for efficiently adapting libraries with async methods to coroutines, so maybe this rule needs relaxing
There was a problem hiding this comment.
Ahh I see what you're saying. What would you suggest?
Do you think it would make sense to have something like
| - Writing the low-level promise_type / awaiter machinery from scratch (use library types) | |
| - Reimplementing coroutine types (`generator`, `task`) that libraries already provide | |
| - Custom awaiters are fine when adapting async libraries to coroutines — that's often the only way to bridge callback-based APIs |
or should I just remove the - Writing the low-level...?
Modern C++ skill guiding Claude toward modern idioms with a security emphasis. Mirrors modern-python in spirit but focuses on language standards rather than toolchain.
Features tiered by practical usability:
Includes SKILL.md entry point + 6 reference docs: