3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-06-19 04:13:38 +00:00

remove a few more copy constructors, though still not enough to enable the assertion in vector

I give up for now; there are too many copies left for little return..
This commit is contained in:
Nuno Lopes 2020-06-03 20:30:21 +01:00
parent e2b2b7f82e
commit e844aef896
17 changed files with 44 additions and 95 deletions

View file

@ -16,17 +16,24 @@ Author:
Revision History:
--*/
#ifndef SCOPED_NUMERAL_VECTOR_H_
#define SCOPED_NUMERAL_VECTOR_H_
#pragma once
#include "util/vector.h"
template<typename Manager>
class _scoped_numeral_vector : public svector<typename Manager::numeral> {
Manager & m_manager;
_scoped_numeral_vector(_scoped_numeral_vector const & v);
public:
_scoped_numeral_vector(Manager & m):m_manager(m) {}
_scoped_numeral_vector(const _scoped_numeral_vector & other) : m_manager(other.m_manager) {
for (unsigned i = 0, e = other.size(); i != e; ++i) {
push_back((*this)[i]);
}
}
_scoped_numeral_vector(_scoped_numeral_vector&&) = default;
~_scoped_numeral_vector() {
reset();
}
@ -66,5 +73,3 @@ public:
svector<typename Manager::numeral>::resize(sz, 0);
}
};
#endif