3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-06-27 08:28:44 +00:00

code simplification

This commit is contained in:
Nikolaj Bjorner 2025-02-18 19:07:58 -08:00
parent a143ed3bff
commit a5e5a35755
6 changed files with 34 additions and 38 deletions

View file

@ -388,6 +388,14 @@ bool all_of(S const& set, T const& p) {
return false;
return true;
}
template<typename S, typename T>
void filter(S& v, T const& p) {
unsigned i = 0;
for (auto const& e: v)
if (p(e))
v[i++] = e;
v.shrink(i);
}
template<typename S, typename T>
bool xor_of(S const& set, T const& p) {