From ae0b66fbeade155235667c3840e54107ffef9267 Mon Sep 17 00:00:00 2001 From: "Dr. Patrick Urbanke" Date: Wed, 22 Jul 2026 23:33:38 +0200 Subject: [PATCH] Explicitly capture key to avoid issues in Clang 15; fixes #699 --- src/rfl/env/Writer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rfl/env/Writer.cpp b/src/rfl/env/Writer.cpp index ba54a3b1..b1f29ec0 100644 --- a/src/rfl/env/Writer.cpp +++ b/src/rfl/env/Writer.cpp @@ -133,7 +133,8 @@ void Writer::end_array(OutputArrayType* _arr) const noexcept { void Writer::end_object(OutputObjectType* _obj) const noexcept { const auto& obj = *_obj; for (const auto& [key, value] : *obj.fields) { - value.visit([&](const auto& _v) { + // Explicit capture of key necessary, because of issues with Clang 15. + value.visit([&, key](const auto& _v) { using T = std::remove_cvref_t; if constexpr (std::is_same_v) { portable_setenv((obj.prefix + key).c_str(), _v.value.c_str());