3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-18 01:02:15 +00:00

Debug dlist insertion

Found because of assertion failure in
test_polysat::test_fixed_point_arith_div_mul_inverse()
This commit is contained in:
Jakob Rath 2022-10-05 17:24:28 +02:00
parent e58815884f
commit f184545aca
5 changed files with 96 additions and 32 deletions

View file

@ -379,10 +379,10 @@ inline size_t megabytes_to_bytes(unsigned mb) {
/** Compact version of std::all_of */
template <typename Container, typename Predicate>
bool all_of(Container const& c, Predicate f)
bool all_of(Container const& c, Predicate p)
{
using std::begin, std::end; // allows begin(c) to also find c.begin()
return std::all_of(begin(c), end(c), std::forward<Predicate>(f));
return std::all_of(begin(c), end(c), std::forward<Predicate>(p));
}
/** Compact version of std::count */
@ -392,3 +392,11 @@ std::size_t count(Container const& c, Item x)
using std::begin, std::end; // allows begin(c) to also find c.begin()
return std::count(begin(c), end(c), std::forward<Item>(x));
}
/** Compact version of std::count_if */
template <typename Container, typename Predicate>
std::size_t count_if(Container const& c, Predicate p)
{
using std::begin, std::end; // allows begin(c) to also find c.begin()
return std::count_if(begin(c), end(c), std::forward<Predicate>(p));
}