mirror of
https://github.com/Z3Prover/z3
synced 2025-07-25 21:57:00 +00:00
add move constructor to ref_vector
This commit is contained in:
parent
82b25a0608
commit
6cefb700ac
1 changed files with 6 additions and 0 deletions
|
@ -45,6 +45,10 @@ public:
|
||||||
typedef T * data;
|
typedef T * data;
|
||||||
|
|
||||||
ref_vector_core(Ref const & r = Ref()):Ref(r) {}
|
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() {
|
~ref_vector_core() {
|
||||||
dec_range_ref(m_nodes.begin(), m_nodes.end());
|
dec_range_ref(m_nodes.begin(), m_nodes.end());
|
||||||
|
@ -207,6 +211,8 @@ public:
|
||||||
this->append(other);
|
this->append(other);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ref_vector(ref_vector && other) : super(std::move(other)) {}
|
||||||
|
|
||||||
ref_vector(TManager & m, unsigned sz, T * const * data):
|
ref_vector(TManager & m, unsigned sz, T * const * data):
|
||||||
super(ref_manager_wrapper<T, TManager>(m)) {
|
super(ref_manager_wrapper<T, TManager>(m)) {
|
||||||
this->append(sz, data);
|
this->append(sz, data);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue