mirror of
https://github.com/Z3Prover/z3
synced 2026-02-20 07:24:40 +00:00
Adopt C++17 structured bindings for map/pair iteration (#8159)
* Initial plan * Adopt structured bindings for map iteration Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com> * Fix DEBUG_CODE macro issue with structured bindings Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
This commit is contained in:
parent
f15b0b2a56
commit
d68837693c
10 changed files with 20 additions and 23 deletions
|
|
@ -197,7 +197,7 @@ namespace opt {
|
|||
for (expr* e : soft) _soft.push_back(std::make_pair(e, rational::one()));
|
||||
lbool r = (*this)(_soft);
|
||||
soft.reset();
|
||||
for (auto const& p : _soft) soft.push_back(p.first);
|
||||
for (auto const& [e, w] : _soft) soft.push_back(e);
|
||||
return r;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue