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

Solve boolean skeleton first

This commit is contained in:
Jakob Rath 2022-12-09 17:22:20 +01:00
parent a6b49d8b4e
commit 8d13446537
3 changed files with 61 additions and 25 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)