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

summaryrefslogtreecommitdiffhomepage
path: root/src/Progmasoft/PropertyEngine.cpp
diff options
context:
space:
mode:
authorLeitwolf2026-10-31 17:18:21 +0300
committerGitHub2026-10-31 17:18:21 +0300
commit326ea0c0213aeecb6b984bba3dabb0ebad97679e (patch)
tree5cec698f0bc0b8a60f45e866fb40f2fd8a358bd1 /src/Progmasoft/PropertyEngine.cpp
parent6a42cdf6461b2577106ef094d6f98025554b6077 (diff)
parentafe91797e9d50cd4712d3694a2e5fedfc0b966b1 (diff)
downloadcatch3-326ea0c0213aeecb6b984bba3dabb0ebad97679e.tar.gz
Merge pull request #22 from Progmasoft/build/cpp17
Build Catch3 as C++17
Diffstat (limited to 'src/Progmasoft/PropertyEngine.cpp')
-rw-r--r--src/Progmasoft/PropertyEngine.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/Progmasoft/PropertyEngine.cpp b/src/Progmasoft/PropertyEngine.cpp
index 571a5ac3..7151dd1a 100644
--- a/src/Progmasoft/PropertyEngine.cpp
+++ b/src/Progmasoft/PropertyEngine.cpp
@@ -231,7 +231,7 @@ namespace Progmasoft::Catch3::Detail
std::size_t size,
bool describe)
{
- return Execute(ChoiceSource(std::span(choices), size), describe);
+ return Execute(ChoiceSource(choices, size), describe);
}
static PropertyResult
@@ -302,10 +302,16 @@ namespace Progmasoft::Catch3::Detail
// Only the examples checked here are dropped; another
// process may have stored new ones meanwhile.
database_.Update([&](std::vector<std::string> &stored) {
- std::erase_if(stored, [&](const std::string &token) {
- return std::find(tokens.begin(), tokens.end(), token)
- != tokens.end();
- });
+ const auto removed = std::remove_if(
+ stored.begin(),
+ stored.end(),
+ [&](const std::string &token) {
+ return std::find(tokens.begin(),
+ tokens.end(),
+ token)
+ != tokens.end();
+ });
+ stored.erase(removed, stored.end());
});
}
return std::nullopt;