Repository navigation
build(web): 显式 #include <iterator>(make_move_iterator 的声明处) - #30
Merged
Merged
Conversation
PR Antruly#29 在 `uvcpp_http_parser.cpp::take_headers()` 里用了 `std::make_move_iterator`,而它的声明处是 `<iterator>`:本仓此前**没有任何 一处** `#include <iterator>`,三平台 CI 能过靠的是**传递包含**(`<string>` / `<vector>` 在 libstdc++ / libc++ / MSVC 上都会把它带进来)。传递包含是实现 细节,不是标准保证 —— 所以这行显式写上。 行尾那句注释是**给它自己的**:免得下一个人看它"好像没人用"就顺手删掉。 随行两处行号位移(本文件 +1 行,锁与文档必须一起挪,否则引用会指向前 1 行): * `tests/tools/doc_line_refs.lock`:`src/web/uvcpp_http_parser.cpp:420-468` → `421-469`,哈希**不变**(`36c72595b65f436f`,区间内容逐行相同)。 * `doc/web-http-guide.md:596` 同步移位。 验证: * `python tests/tools/check_doc_lines.py`:**5/5 全绿**(713 条引用)。 * 该 TU 用本仓真实构建的 include/config 组合做 `-fsyntax-only`:**rc=0** ——`-I` 指到一棵已配置树的**生成头** `include/` 加 `src/` 加 llhttp 头, 其余零开关。**未做全量构建**:这处只加一行标准头,且 .cpp 的包含不外溢。
Antruly
added a commit
that referenced
this pull request
Sep 21, 2026
PR #30(43194bd)已合入 master:uvcpp_http_parser.cpp 显式包含 <iterator>, 为 std::make_move_iterator 提供声明(此前靠传递包含)。 按既有约定,每并入一个功能升一档 patch 版本: src/uvcpp/uvcpp_version.h 的 @Version 与 UVCPP_VERSION_PATCH 1.2.18 -> 1.2.19, 两版 README 的版本串同步。IS_RELEASE 保持 0。 验证:重新 configure(版本头只在 configure 期进构建,uvcppConfig.cmake 里已是 1.2.19);build-h2 Release 全量重建 --parallel 4,`grep -c "error C"` = 0; ctest -C Release 96/96 全绿;三道文档门禁全过(check_doc_versions 报 4 处版本串 == 1.2.19-dev)。 Co-Authored-By: Claude Code <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
接 #26 里你留的第 1 条 —— 我定成补,这就是那一行。
为什么补
std::make_move_iterator的声明处是<iterator>(不是<utility>、也不是<string>)。本仓此前没有任何一处#include <iterator>,三平台 CI(含 macOS/libc++)能过靠的是传递包含 —— 那是实现细节,不是标准保证。这行加上,take_headers()就不再依赖它。行尾那句注释是给它自己的:免得下一个人看它"好像没人用"就顺手删掉。一条口径要报给你(不是反方论据,是事实)
我顺手全仓查了一遍同类情况:用
std::move的 12 个文件里,只有src/req/uvcpp_req.h写了#include <utility>,剩下 11 个也是靠传递包含。所以这一补在本仓是孤例 —— 我不装作它是"本仓惯例的延伸"。仍然补的理由:这是我这次引入的新调用,先把新账做对;要不要把 11 个老账一起收成一条 CI 判据(
misc-include-cleaner那类),是另一件事,你定。你要是更想保持"一律靠传递包含"的一致,说一声我撤 —— 补丁已在手,撤是零成本。改动
src/web/uvcpp_http_parser.cpp:#include <iterator>(+1 行)。tests/tools/doc_line_refs.lock:src/web/uvcpp_http_parser.cpp:420-468→421-469,哈希不变(36c72595b65f436f,区间内容逐行相同)。doc/web-http-guide.md:596同步移位 —— 只挪锁不挪文档的话,那条引用会指向前 1 行(你上一轮教我的那条,这次两处一起挪)。验证
python tests/tools/check_doc_lines.py:5/5 全绿(713 条引用)。-I <tree>/include〔生成头〕+src/+ llhttp 头,-DUVCPP_WEB_ENABLE=1)做-fsyntax-only:rc=0。.cpp的包含不外溢到别的 TU。要跑我补,但那份证据的信息量是零。uvcpp_version.h。#26 里你留的第 2 条(
对公布基准(两条短头)不变的口径)我在那边单独回。