Skip to content

feature: vol3 migration ends and aligned up mostly passages#79

Merged
Charliechen114514 merged 7 commits into
mainfrom
feat/vol3-migrate
Jun 24, 2026
Merged

feature: vol3 migration ends and aligned up mostly passages#79
Charliechen114514 merged 7 commits into
mainfrom
feat/vol3-migrate

Conversation

@Charliechen114514

Copy link
Copy Markdown
Member

feat/vol3-migrate 完成 vol3 标准库卷的剩余章节迁移,对齐全站英文翻译,并为核心文章加入可在线运行的编译示例(OnlineCompilerDemo)。

1. vol3 新章节(CN,47 文件)

strings(50–54)、time-numeric(58–60)、iterators-algorithms(40–46)、error-utils(61–68)、io(55–57)等子目录文章 + 各 index.md

2. 全站 EN 翻译对齐(132 文件,68 新增)

translate.py(glm-4.6)同步译出新增/改动的 CN 文章,覆盖 vol3 全卷 + vol4 设计模式 + vol5/7/8/10 等。0 翻译失败、0 孤儿文件、0 内部死链

3. 在线编译示例(12 个 example + 12 篇文章插 OnlineCompilerDemo)

code/examples/vol3/ 下 12 个独立可编译程序,文章插入组件(Compiler Explorer 在线运行 / 看汇编):

文章 演示点 类型
01-container-selection vector vs list 遍历 cache benchmark allow-run
40-iterator-basics C++20 concept 给迭代器量等级 allow-run
42-algorithm-overview 二分 vs 线性查找(O(log n) 红利) allow-run
44-numeric accumulate 截断坑(初始值类型) allow-run
46-parallel reduce seq vs par 汇编(TBB 调用) allow-x86-asm
50-string-view const string& vs string_view 传参 allow-run
53-print cout / printf / std::print(-std=c++23) allow-run
54-regex (a+)+b 病态回溯指数爆炸 allow-run
59-cmath NaN 不等于自己 allow-run
60-random <random> 三种分布统计 allow-run
61-optional C++20 constexpr optional allow-run
68-source-location current() 零开销(汇编 0 调用) allow-x86-asm

4. 配置与脚本

  • site/.vitepress/config/sidebar.ts(vol3 侧边栏)
  • scripts/translate.pyscripts/cppref_manifest.json
  • dev docs、.claude/notebook-migration-plan.md 这个部分是笔者投放的自己私有笔记的迁移清单

质检(preflight 全过)

  • frontmatter:810 文件 0 error / 0 warning
  • markdownlint:0 error(EN 的 MD030/MD050 --fix + 手修 MD032/MD024/MD042/MD040)
  • 粗体渲染:pre-commit hook Passed
  • 内部链接:0 死链(EN 相对路径深度坑已修:vol5 两个 lab)
  • 索引:各子目录 index.md 齐全
  • 代码示例:12 个本地 g++ 编译运行验证(46 用 -c 只编译避 TBB、53 用 -std=c++23)

备注

  • 并行算法篇(46)因 std::execution::par 需 TBB、在线 executor 默认不链,降级为 allow-x86-asm(只编译看汇编,不运行)。
  • 病态回溯 demo(54)在线只跑到 n=24(n=28 实测 22s 会超 executor 限)。

@Charliechen114514 Charliechen114514 merged commit aff4729 into main Jun 24, 2026
6 checks passed
@Charliechen114514 Charliechen114514 deleted the feat/vol3-migrate branch June 24, 2026 05:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant