3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-26 13:06:05 +00:00

Add compact version of std::all_of

This commit is contained in:
Jakob Rath 2022-10-03 10:55:13 +02:00
parent 0bea276e82
commit cd2d197bb9
3 changed files with 18 additions and 8 deletions

View file

@ -29,14 +29,14 @@ namespace polysat {
}
bool clause::is_always_false(solver& s) const {
return std::all_of(m_literals.begin(), m_literals.end(), [&s](sat::literal lit) {
return all_of(m_literals, [&s](sat::literal lit) {
signed_constraint c = s.m_constraints.lookup(lit);
return c.is_always_false();
});
}
bool clause::is_currently_false(solver& s) const {
return std::all_of(m_literals.begin(), m_literals.end(), [&s](sat::literal lit) {
return all_of(m_literals, [&s](sat::literal lit) {
signed_constraint c = s.m_constraints.lookup(lit);
return c.is_currently_false(s);
});