mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 17:15:31 +00:00
fix #1816 - m_parent_selects gets updated while accessing an interator, fix is to rely on the size of the vector for iteration
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
aa723f1eee
commit
16be5b0e7d
3 changed files with 75 additions and 84 deletions
|
@ -306,6 +306,18 @@ public:
|
|||
// prevent abuse:
|
||||
ref_vector & operator=(ref_vector const & other) = delete;
|
||||
|
||||
bool operator==(ref_vector const& other) const {
|
||||
if (other.size() != size()) return false;
|
||||
for (unsigned i = size(); i-- > 0; ) {
|
||||
if (other[i] != (*this)[i]) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool operator!=(ref_vector const& other) const {
|
||||
return !(*this == other);
|
||||
}
|
||||
|
||||
bool forall(std::function<bool(T*)>& predicate) const {
|
||||
for (T* t : *this)
|
||||
if (!predicate(t))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue