已关闭
[Course-Feedback|课程反馈]: examples Makefile 使用 C++14 与主仓 CMakeLists.txt 的 C++17 不一致 #597
Unknwn创建于  8月3日关闭于  25 天前
Unknwn
Unknwn
8月3日 创建

类型: 优化建议
描述:
主仓 CMakeLists.txt 使用 C++17,但 13 个 examples 的 Makefile 中有 12 个使用 -std=c++14,仅 examples/05_custom_ops_allgather/testcase/Makefile 使用 -std=c++17。若示例代码使用了 C++17 特性(如 std::optional、结构化绑定、if constexpr),在 C++14 下将编译失败。
证据:

  • CMakeLists.txt:65 — set(CMAKE_CXX_STANDARD 17)
  • 12 个 Makefile 使用 -std=c++14(通过 grep -r "std=c++" examples//Makefile examples//*/Makefile 验证)
  • examples/05_custom_ops_allgather/testcase/Makefile 使用 -std=c++17
    建议: 将所有 examples Makefile 中的 -std=c++14 统一为 -std=c++17,与主仓保持一致。
likedislike
Leewis成员
8月3日 评论:

感谢对于社区的关注与反馈,当前建议代码和样例支持C++版本一致化的诉求已收到,将进行诉求评估分析,待明确后给出答复;

likedislike
LLeewis成员
8月3日 issue类型由 缺陷 改变为 需求
LLeewis成员
8月3日 将 Leewis 设为负责人
LLeewis成员
8月7日 关联了pull request:modify clangformat version && example c++17
LLeewis成员
8月10日 删除了关联的pull request:modify clangformat version && example c++17
LLeewis成员
8月13日 关联了pull request:modify example c++17 & third party software notice
CANN-robotCANN-robot成员
25 天前 关闭了 issue
CANN-robotCANN-robot成员
25 天前 添加了label:resolved
严正行严正行成员
24 天前 添加了label:tech-debt
LLeewis成员
17 天前 关联了看板:HCCL