Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/extras
diff options
context:
space:
mode:
authorLeitwolf112026-10-31 13:36:43 +0300
committerLeitwolf112026-10-31 13:36:43 +0300
commitafe91797e9d50cd4712d3694a2e5fedfc0b966b1 (patch)
tree5cec698f0bc0b8a60f45e866fb40f2fd8a358bd1 /extras
parent653dde1cc5a2f17faec2ed25f904de9c3cf3c8fa (diff)
downloadcatch3-build/cpp17.tar.gz
Finish the move to C++17 in POSIX code and the amalgamated filesbuild/cpp17
A lambda in the POSIX half of Process.cpp captured a structured binding, which needs C++20 and which a Windows build never compiles. The files in extras still held the C++20 sources, so they are generated again, and the generator no longer says the runner needs C++20.
Diffstat (limited to 'extras')
-rw-r--r--extras/catch_amalgamated.cpp48
-rw-r--r--extras/catch_amalgamated.hpp4
-rw-r--r--extras/catch_amalgamated_third_party.hpp2
3 files changed, 32 insertions, 22 deletions
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index fc87bf40..3b15cc2d 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -7,14 +7,14 @@
// SPDX-License-Identifier: BSL-1.0
// Catch3 v0.3.0, on the Catch2 v3.16.1 engine
-// Generated: 2026-10-29 19:30:41.305371
+// Generated: 2026-10-31 13:33:37.309963
// ----------------------------------------------------------
// This file is an amalgamation of multiple different files.
// You probably shouldn't edit it directly.
//
// The parts that come from src/Progmasoft, the Catch3 runner, keep
// their own copyright and license lines (MPL-2.0 WITH
-// AdditionRef-Progmasoft-Exception-1.1). The runner needs C++20.
+// AdditionRef-Progmasoft-Exception-1.1). The runner needs C++17.
// ----------------------------------------------------------
#include "catch_amalgamated.hpp"
@@ -14663,18 +14663,22 @@ namespace Progmasoft::Catch3::Runner
for (const auto &[name, value] : additions)
{
const std::wstring wideName = Widen(name);
- std::erase_if(entries, [&](const std::wstring &entry) {
- // A leading '=' marks the hidden per-drive variables.
- const auto equals = entry.find(L'=', 1);
- return equals == wideName.size()
- && CompareStringOrdinal(
- entry.data(),
- static_cast<int>(equals),
- wideName.data(),
- static_cast<int>(wideName.size()),
- TRUE)
- == CSTR_EQUAL;
- });
+ const auto removed = std::remove_if(
+ entries.begin(),
+ entries.end(),
+ [&](const std::wstring &entry) {
+ // A leading '=' marks the hidden per-drive variables.
+ const auto equals = entry.find(L'=', 1);
+ return equals == wideName.size()
+ && CompareStringOrdinal(
+ entry.data(),
+ static_cast<int>(equals),
+ wideName.data(),
+ static_cast<int>(wideName.size()),
+ TRUE)
+ == CSTR_EQUAL;
+ });
+ entries.erase(removed, entries.end());
entries.push_back(wideName + L"=" + Widen(value));
}
std::wstring block;
@@ -15429,11 +15433,17 @@ namespace Progmasoft::Catch3::Runner
}
for (const auto &[name, value] : options.environment)
{
- std::erase_if(environmentStorage, [&](const std::string &entry) {
- return entry.size() > name.size()
- && entry.compare(0, name.size(), name) == 0
- && entry[name.size()] == '=';
- });
+ // A lambda cannot capture a structured binding in C++17.
+ const std::string &variable = name;
+ const auto removed = std::remove_if(
+ environmentStorage.begin(),
+ environmentStorage.end(),
+ [&](const std::string &entry) {
+ return entry.size() > variable.size()
+ && entry.compare(0, variable.size(), variable) == 0
+ && entry[variable.size()] == '=';
+ });
+ environmentStorage.erase(removed, environmentStorage.end());
environmentStorage.push_back(name + "=" + value);
}
std::vector<char *> environment;
diff --git a/extras/catch_amalgamated.hpp b/extras/catch_amalgamated.hpp
index 09e99fb2..18d52356 100644
--- a/extras/catch_amalgamated.hpp
+++ b/extras/catch_amalgamated.hpp
@@ -7,14 +7,14 @@
// SPDX-License-Identifier: BSL-1.0
// Catch3 v0.3.0, on the Catch2 v3.16.1 engine
-// Generated: 2026-10-29 19:30:41.164140
+// Generated: 2026-10-31 13:33:37.220554
// ----------------------------------------------------------
// This file is an amalgamation of multiple different files.
// You probably shouldn't edit it directly.
//
// The parts that come from src/Progmasoft, the Catch3 runner, keep
// their own copyright and license lines (MPL-2.0 WITH
-// AdditionRef-Progmasoft-Exception-1.1). The runner needs C++20.
+// AdditionRef-Progmasoft-Exception-1.1). The runner needs C++17.
// ----------------------------------------------------------
#ifndef CATCH_AMALGAMATED_HPP_INCLUDED
#define CATCH_AMALGAMATED_HPP_INCLUDED
diff --git a/extras/catch_amalgamated_third_party.hpp b/extras/catch_amalgamated_third_party.hpp
index f5961365..3462ff20 100644
--- a/extras/catch_amalgamated_third_party.hpp
+++ b/extras/catch_amalgamated_third_party.hpp
@@ -1,5 +1,5 @@
// Catch3 v0.3.0: yyjson and pugixml for catch_amalgamated.cpp
-// Generated: 2026-10-29 19:10:35.543593
+// Generated: 2026-10-31 13:33:37.396913
// ----------------------------------------------------------
// This file is an amalgamation of src/Progmasoft/Runner/Yyjson.inl,
// src/Progmasoft/PugiXml.inl and the libraries they include from