3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 17:15:31 +00:00

Merge branch 'polysat' of https://github.com/Z3Prover/z3 into polysat

This commit is contained in:
Clemens Eisenhofer 2022-12-14 10:39:15 +01:00
commit dc95179ae5
23 changed files with 797 additions and 325 deletions

View file

@ -385,6 +385,14 @@ bool all_of(Container const& c, Predicate p)
return std::all_of(begin(c), end(c), std::forward<Predicate>(p));
}
/** Compact version of std::any_of */
template <typename Container, typename Predicate>
bool any_of(Container const& c, Predicate p)
{
using std::begin, std::end; // allows begin(c) to also find c.begin()
return std::any_of(begin(c), end(c), std::forward<Predicate>(p));
}
/** Compact version of std::count */
template <typename Container, typename Item>
std::size_t count(Container const& c, Item x)