From 826e639b88c1b30a834bd01c190b0765e4810341 Mon Sep 17 00:00:00 2001 From: Andreas Stefl Date: Thu, 27 Aug 2026 23:30:25 +0200 Subject: [PATCH] fix(test): bind a pdf test's loop variable to the literal it iterates `const std::string &` over a braced list of `const char *` constructs a temporary per iteration, which gcc rejects under `-Werror=range-loop-construct`. Clang does not, so it reached main. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01KiPhteiEmPp8iPQLBfnthA --- test/src/internal/pdf/pdf_file.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/src/internal/pdf/pdf_file.cpp b/test/src/internal/pdf/pdf_file.cpp index 33639fea2..1fc1f8e8f 100644 --- a/test/src/internal/pdf/pdf_file.cpp +++ b/test/src/internal/pdf/pdf_file.cpp @@ -445,8 +445,7 @@ TEST(PdfFile, views_agree_on_an_image_name) { // path -> the bytes served under it, across every view std::map bytes_by_path; - for (const std::string &view : - {"document.html", "page0.html", "page1.html"}) { + for (const auto *const view : {"document.html", "page0.html", "page1.html"}) { std::ostringstream out; for (const auto &[resource, location] : service.write_html(view, out)) { if (resource.type() != HtmlResourceType::image) {