Skip to content

Commit f7991cc

Browse files
committed
docs(design): record the MSVC c++20 import std result from Windows CI
cl 19.51.36252 (VS 18 / MSVC 14.51) builds and runs `import std;` at /std:c++20 — the premise behind letting MSVC answer 20 is now a measured fact instead of a date-based estimate. The 19.38 threshold stays as the guard for STLs predating microsoft/STL#3977.
1 parent 4be259f commit f7991cc

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

.agents/docs/2026-07-31-cpp20-standard-support-design.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@ C++17 及以下**不存在**。所以 `c++20` 是这个白名单的天然下界,
100100
| gcc 15.1.0 (musl) | `x86_64-linux-musl` ||| ✅(`-static` 本机跑通) |
101101
| gcc 16.1.0 (mingw cross) | `x86_64-w64-mingw32` ||| ✅(`-static` + wine 跑通) |
102102
| clang 22.1.8 + libc++ | `x86_64-unknown-linux-gnu` | ✅(含 `std.compat`) ||`hi 1` |
103-
| MSVC / clang+MSVC STL | Windows | **本机无法验证** → 定案取 20,由 Windows CI 硬断言背书(§5.3) |||
103+
| MSVC(`cl 19.51.36252`,VS 18 / MSVC 14.51) | `x86_64-windows-msvc` |**Windows CI 实测**(PR#325,`177_cpp20_msvc.sh`) ||`cl20 3` |
104+
| clang + MSVC STL | Windows | 未单独验证 → 保持 23(`tc.version` 是 clang 的,答不了 cl 的问题) |||
104105
| llvm 20.1.7(本机 payload) || 不适用:该 payload 只有 `bin/ lib/`,**`share/libc++/v1/std.cppm`**`hasImportStd=false`,与档位无关 |
105106

106107
附带抓到的两条硬事实:
@@ -323,7 +324,13 @@ CI 矩阵:`ci-linux-e2e.yml` / `ci-macos-e2e.yml` / `ci-windows-e2e.yml` 已按
323324
`run_all.sh`,新增脚本自动进矩阵。musl / mingw 交叉档位由 `cross-build-test.yml`
324325
覆盖一条 c++20 冒烟即可(§2.2 已实机跑通,CI 只做回归)。
325326

326-
### 5.3 MSVC 的实测义务(定案取 20 的前提)
327+
### 5.3 MSVC 的实测义务(定案取 20 的前提)—— ✅ 已兑现
328+
329+
**结论(PR#325,2026-07-31):Windows CI 上 `177_cpp20_msvc.sh` 通过。**
330+
runner 的 `cl 19.51.36252`(VS 18 Enterprise / MSVC 14.51.36231)用 `/std:c++20`
331+
真实编译并运行了 `import std;`,`compile_commands.json` 里是 `/std:c++20` 而非
332+
`/std:c++latest`。取 20 的前提成立;19.38 阈值仍只保护更老的 STL。
333+
327334

328335
取 20 是**乐观决策**,所以它必须由实测背书,而不是由文档背书 —— 恰恰因为
329336
微软自己的文档还写着 `/std:c++latest`(#3945 已 fixed 但 Learn 未更新)。

0 commit comments

Comments
 (0)