suggest_modern_cpp
Upgrade C++ code to modern standards by analyzing existing code and providing specific suggestions with rewrite examples for newer C++ versions.
Instructions
建议将代码升级为现代 C++ 写法
参数:
code: 要分析的 C++ 代码
target_standard: 目标 C++ 标准,可选值:
- cpp11: C++11
- cpp14: C++14
- cpp17: C++17 (默认)
- cpp20: C++20
- cpp23: C++23
返回:
现代化建议报告,包括可以使用的新特性和重写示例
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"code": "<code>"
},
"name": "suggest_modern_cpp"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| target_standard | No | cpp17 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |