3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-10-31 19:52:29 +00:00

Use noexcept more. (#7058)

This commit is contained in:
Bruce Mitchener 2023-12-16 19:14:53 +07:00 committed by GitHub
parent b44ab2f620
commit 50e0fd3ba6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
69 changed files with 97 additions and 112 deletions

View file

@ -110,7 +110,7 @@ public:
return *this;
}
void swap(mpz & other) {
void swap(mpz & other) noexcept {
std::swap(m_val, other.m_val);
std::swap(m_ptr, other.m_ptr);
unsigned o = m_owner; m_owner = other.m_owner; other.m_owner = o;
@ -131,7 +131,7 @@ public:
class mpz_stack : public mpz {};
#endif
inline void swap(mpz & m1, mpz & m2) { m1.swap(m2); }
inline void swap(mpz & m1, mpz & m2) noexcept { m1.swap(m2); }
template<bool SYNCH = true>
class mpz_manager {
@ -573,7 +573,7 @@ public:
// deallocates any memory.
void reset(mpz & a);
void swap(mpz & a, mpz & b) {
void swap(mpz & a, mpz & b) noexcept {
std::swap(a.m_val, b.m_val);
std::swap(a.m_ptr, b.m_ptr);
auto o = a.m_owner; a.m_owner = b.m_owner; b.m_owner = o;