mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 17:15:31 +00:00
add obj_ref::operator=(obj_ref &&) + a few explicit uses
This commit is contained in:
parent
ea4218a192
commit
2b31024dab
5 changed files with 14 additions and 5 deletions
|
@ -92,6 +92,15 @@ public:
|
|||
return *this;
|
||||
}
|
||||
|
||||
obj_ref & operator=(obj_ref && n) {
|
||||
SASSERT(&m_manager == &n.m_manager);
|
||||
if (this != &n) {
|
||||
std::swap(m_obj, n.m_obj);
|
||||
n.reset();
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
void reset() {
|
||||
dec_ref();
|
||||
m_obj = nullptr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue