跳到技能内容
词映 AI导航
发现工具选型指南Skills 技能AI 快讯AI图片AI视频AI文档AI办公AI助手AI搜索AI编程AI音频AI设计AI智能体模型与开发AI学习模型评测AI提示词内容检测AI金融AI 3D扫描与识别其他工具跨境电商 AI
词映 AI导航
工具库Skills 技能
我的收藏
词映 AI导航
发现工具选型指南Skills 技能AI 快讯AI图片AI视频AI文档AI办公AI助手AI搜索AI编程AI音频AI设计AI智能体模型与开发AI学习模型评测AI提示词内容检测AI金融AI 3D扫描与识别其他工具跨境电商 AI
Skills directory/mturac/everything-openai-codex/cpp-coding-standards

Codex Review C++ Resource Ownership with RAII

Use modern C++ ownership types to clarify local lifetimes and verify small changes with existing tests.

中文

Install in Codex

Use a local C++17 or newer project, its build command, and tests around the affected function.

  1. Copy the pinned `docs/ja-JP/skills/cpp-coding-standards/` directory into `.agents/skills/cpp-coding-standards/` in the project.
  2. Identify the class and resource lifetime in Codex and ask it to distinguish owning references from borrowed access.

Example task

Review a buffer owned only by a local `ReportBuffer`. Propose a small move to `std::unique_ptr` and check the existing error path.

What to check

The ownership is explicit, scope exit destroys the owned object on failure, and tests preserve visible behavior.

Original SKILL.md on GitHub · Updated 2026-11-13

Frequently asked question

When is `std::shared_ptr` appropriate?

Use shared ownership when several independent owners really share the lifetime. Start by identifying who is responsible for release.

Related skills from this repository

  • Codex Verify Local TypeScript Scripts and Unit Tests with Bun
  • Codex Build a VS Code CodeTour with File and Line Anchors
Browse Codex skills in the Chinese directory
词映 AI 导航Skills 技能
工具分类全部工具已本地化技能选型指南AI 快讯