mirror of
				https://github.com/Z3Prover/z3
				synced 2025-10-31 11:42:28 +00:00 
			
		
		
		
	fix crashes due to my last commit
This commit is contained in:
		
							parent
							
								
									bb26f219fe
								
							
						
					
					
						commit
						f30e8ccec3
					
				
					 3 changed files with 12 additions and 0 deletions
				
			
		|  | @ -102,6 +102,15 @@ public: | |||
|     mpz(int v):m_val(v), m_kind(mpz_small), m_owner(mpz_self), m_ptr(nullptr) {} | ||||
|     mpz():m_val(0), m_kind(mpz_small), m_owner(mpz_self), m_ptr(nullptr) {} | ||||
|     mpz(mpz_type* ptr): m_val(0), m_kind(mpz_small), m_owner(mpz_ext), m_ptr(ptr) { SASSERT(ptr);} | ||||
|     mpz(mpz && other) noexcept : m_val(other.m_val), m_kind(other.m_kind), m_owner(other.m_owner), m_ptr(nullptr) { | ||||
|         std::swap(m_ptr, other.m_ptr); | ||||
|     } | ||||
| 
 | ||||
|     mpz& operator=(mpz &&other) { | ||||
|         swap(other); | ||||
|         return *this; | ||||
|     } | ||||
| 
 | ||||
|     void swap(mpz & other) {  | ||||
|         std::swap(m_val, other.m_val); | ||||
|         std::swap(m_ptr, other.m_ptr); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue