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:
parent
0bea276e82
commit
cd2d197bb9
3 changed files with 18 additions and 8 deletions
|
@ -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);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue