mcpp-style-ref

Apply C++23 style guidelines to Modern/Module C++ projects.

599|48|Updated Aug 19, 2024
One-click install
npx skills add https://github.com/openxlings/xlings --skill mcpp-style-ref
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mcpp-style-ref
Source: https://github.com/openxlings/xlings/tree/main/.agents/skills/mcpp-style-ref
Command: npx skills add https://github.com/openxlings/xlings --skill mcpp-style-ref

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the challenge of maintaining consistent Modern/Module C++ coding styles in mcpp projects, streamlining the process of coding and code review, especially with the advent of C++23.

Core Features & Use Cases

  • Code Formatting: Ensures proper PascalCase for types, camelCase for object and member names, snake_case for function names, and more.
  • Module Structure: Facilitates the creation and usage of modern C++ modules using import std and proper .cppm and .cpp organization.
  • Naming Conventions: Applies guidelines for constants, global variables, namespaces, and other identifiers.
  • Use Case: Ideal for users developing or reviewing modern C++ modules in mcpp projects.

Quick Start

Apply the mcpp-style-ref Skill to format and standardize your C++ modules.

Frequently Asked Questions about mcpp-style-ref

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What naming conventions should I use for C++23 module-based code?

C++23 module-based code should use PascalCase for types, camelCase for object and member names, and snake_case for function names. This ensures consistent identifier formatting across types, constants, and global variables.

How do I structure C++23 modules using import std and export statements?

Structure C++23 modules by organizing code into `.cppm` module interface files and `.cpp` implementation files, utilizing `import std` for standard library access and `export` statements to expose public APIs.

Does mcpp-style-ref enforce formatting for both module interfaces and implementations?

Yes, mcpp-style-ref enforces Modern C++ coding styles across both `.cppm` module interface files and `.cpp` implementation files, ensuring standardized naming and module structure throughout the project.

What is the best way to standardize code review for Modern C++ projects?

Standardize code review for Modern C++ projects by applying automated C++23 style guidelines, ensuring proper file organization, `import std` usage, and consistent naming conventions across the codebase.

Can I use this coding style guide for older C++ versions without modules?

No, this coding style guide targets C++23 module-based code specifically. It emphasizes modern module syntax and `.cppm` file organization, which may not apply to older C++ versions lacking module support.