用途:面向现代 C++(C++23/C++20)开发,覆盖 RAII、智能指针、概念、范围、模块与 CMake,适合高性能 C++ 项目。自动触发文件包括 .cpp、.hpp、.h、CMakeLists.txt、vcpkg.json、conanfile.txt 及现代 C++ 讨论。
主要能力:C++23 特性(std::expected、std::print、std::generator、deducing this);C++20 特性(概念、范围、模块、协程、std::format);内存安全(RAII、Rule of 5、unique_ptr/shared_ptr/weak_ptr);STL(容器、算法、迭代器、std::span、std::string_view);构建系统(CMake 3.28+、FetchContent、presets);并发(std::thread、std::jthread、std::async、原子操作、std::latch/barrier);测试(Google Test、Catch2);包管理(vcpkg、Conan 2.0)。
使用方式:资料给出智能指针工厂、概念约束、范围管道等模式,以及 CMakeLists.txt 结构、std::jthread 与停止令牌、同步原语等示例。版本检查可运行 g++ --version(需 GCC 13+)、clang++ --version(需 Clang 17+)、cmake --version(需 CMake 3.28+);常用编译标志为 -std=c++23 -Wall -Wextra -Wpedantic -O2,调试可加 -fsanitize=address,undefined -g。vcpkg 集成需克隆仓库、运行 bootstrap-vcpkg.sh、安装 fmt、nlohmann-json、gtest,并在 CMake 中通过 -DCMAKE_TOOLCHAIN_FILE 指向 vcpkg 的 buildsystems/vcpkg.cmake。
适用场景:现代 C++ 项目开发、构建配置、并发与测试。限制:资料未提供收费、价格、平台与效果信息;高级主题(模板元编程、线程池、无锁数据结构、自定义分配器、SIMD、依赖注入等)仅指向 Advanced Patterns 指南,未展开。