3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-11 03:33:35 +00:00

add move constructor to ref_vector

This commit is contained in:
Nuno Lopes 2017-10-15 19:21:02 +01:00
parent 82b25a0608
commit 6cefb700ac

View file

@ -45,6 +45,10 @@ public:
typedef T * data;
ref_vector_core(Ref const & r = Ref()):Ref(r) {}
ref_vector_core(ref_vector_core && other) :
Ref(std::move(other)),
m_nodes(std::move(other.m_nodes)) {}
~ref_vector_core() {
dec_range_ref(m_nodes.begin(), m_nodes.end());
@ -207,6 +211,8 @@ public:
this->append(other);
}
ref_vector(ref_vector && other) : super(std::move(other)) {}
ref_vector(TManager & m, unsigned sz, T * const * data):
super(ref_manager_wrapper<T, TManager>(m)) {
this->append(sz, data);