mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 17:15:31 +00:00
Use noexcept
more. (#7058)
This commit is contained in:
parent
b44ab2f620
commit
50e0fd3ba6
69 changed files with 97 additions and 112 deletions
|
@ -503,7 +503,7 @@ namespace dd {
|
|||
unsigned max_pow2_divisor() const { return m->max_pow2_divisor(root); }
|
||||
unsigned_vector const& free_vars() const { return m->free_vars(*this); }
|
||||
|
||||
void swap(pdd& other) { VERIFY_EQ(m, other.m); std::swap(root, other.root); }
|
||||
void swap(pdd& other) noexcept { VERIFY_EQ(m, other.m); std::swap(root, other.root); }
|
||||
|
||||
pdd_iterator begin() const;
|
||||
pdd_iterator end() const;
|
||||
|
@ -547,7 +547,7 @@ namespace dd {
|
|||
inline pdd& operator-=(pdd & p, rational const& q) { p = p - q; return p; }
|
||||
inline pdd& operator+=(pdd & p, rational const& q) { p = p + q; return p; }
|
||||
|
||||
inline void swap(pdd& p, pdd& q) { p.swap(q); }
|
||||
inline void swap(pdd& p, pdd& q) noexcept { p.swap(q); }
|
||||
|
||||
std::ostream& operator<<(std::ostream& out, pdd const& b);
|
||||
|
||||
|
|
|
@ -517,7 +517,7 @@ public:
|
|||
|
||||
|
||||
template <typename K>
|
||||
static void swap(vector<K> &v, unsigned i, unsigned j) {
|
||||
static void swap(vector<K> &v, unsigned i, unsigned j) noexcept {
|
||||
auto t = v[i];
|
||||
v[i] = v[j];
|
||||
v[j] = t;
|
||||
|
|
|
@ -358,7 +358,7 @@ namespace algebraic_numbers {
|
|||
return a.to_algebraic()->m_p_sz - 1;
|
||||
}
|
||||
|
||||
void swap(numeral & a, numeral & b) {
|
||||
void swap(numeral & a, numeral & b) noexcept {
|
||||
std::swap(a.m_cell, b.m_cell);
|
||||
}
|
||||
|
||||
|
@ -2935,7 +2935,7 @@ namespace algebraic_numbers {
|
|||
return m_imp->to_rational(const_cast<numeral&>(a), r);
|
||||
}
|
||||
|
||||
void manager::swap(numeral & a, numeral & b) {
|
||||
void manager::swap(numeral & a, numeral & b) noexcept {
|
||||
return m_imp->swap(a, b);
|
||||
}
|
||||
|
||||
|
|
|
@ -129,7 +129,7 @@ namespace algebraic_numbers {
|
|||
void set(numeral & a, mpq const & n);
|
||||
void set(numeral & a, numeral const & n);
|
||||
|
||||
void swap(numeral & a, numeral & b);
|
||||
void swap(numeral & a, numeral & b) noexcept;
|
||||
|
||||
/**
|
||||
\brief Store in b an integer value smaller than 'a'.
|
||||
|
|
|
@ -447,7 +447,7 @@ namespace polynomial {
|
|||
}
|
||||
};
|
||||
|
||||
inline void swap(monomial * & m1, monomial * & m2) { std::swap(m1, m2); }
|
||||
inline void swap(monomial * & m1, monomial * & m2) noexcept { std::swap(m1, m2); }
|
||||
|
||||
typedef chashtable<monomial*, monomial::hash_proc, monomial::eq_proc> monomial_table;
|
||||
|
||||
|
|
|
@ -126,7 +126,7 @@ namespace upolynomial {
|
|||
m_factors[i].swap(p);
|
||||
}
|
||||
|
||||
void core_manager::factors::swap(factors & other) {
|
||||
void core_manager::factors::swap(factors & other) noexcept {
|
||||
m_factors.swap(other.m_factors);
|
||||
m_degrees.swap(other.m_degrees);
|
||||
nm().swap(m_constant, other.m_constant);
|
||||
|
|
|
@ -89,7 +89,7 @@ namespace upolynomial {
|
|||
void push_back_swap(numeral_vector & p, unsigned degree);
|
||||
|
||||
void swap_factor(unsigned i, numeral_vector & p);
|
||||
void swap(factors & other);
|
||||
void swap(factors & other) noexcept;
|
||||
void multiply(numeral_vector & out) const;
|
||||
|
||||
void display(std::ostream & out) const;
|
||||
|
|
|
@ -85,7 +85,7 @@ namespace upolynomial {
|
|||
|
||||
unsigned max_degree() const { return m_set.size() - 1; }
|
||||
|
||||
void swap(factorization_degree_set & other) {
|
||||
void swap(factorization_degree_set & other) noexcept {
|
||||
m_set.swap(other.m_set);
|
||||
}
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ public:
|
|||
SASSERT(j < n);
|
||||
return a_ij[i*n + j]; }
|
||||
mpz & operator()(unsigned i, unsigned j) { SASSERT(i < m); SASSERT(j < n); return a_ij[i*n + j]; }
|
||||
void swap(mpz_matrix & B) { std::swap(m, B.m); std::swap(n, B.n); std::swap(a_ij, B.a_ij); }
|
||||
void swap(mpz_matrix & B) noexcept { std::swap(m, B.m); std::swap(n, B.n); std::swap(a_ij, B.a_ij); }
|
||||
mpz * row(unsigned i) const { SASSERT(i < m); return a_ij + i*n; }
|
||||
};
|
||||
|
||||
|
@ -136,7 +136,7 @@ public:
|
|||
mpz_matrix const & get() const { return A; }
|
||||
mpz_matrix & get() { return A; }
|
||||
|
||||
void swap(mpz_matrix & B) { A.swap(B); }
|
||||
void swap(mpz_matrix & B) noexcept { A.swap(B); }
|
||||
|
||||
void set(unsigned i, unsigned j, mpz const & v) { nm().set(A(i, j), v); }
|
||||
void set(unsigned i, unsigned j, int v) { nm().set(A(i, j), v); }
|
||||
|
|
|
@ -135,7 +135,7 @@ namespace realclosure {
|
|||
typedef interval_manager<mpbq_config> mpbqi_manager;
|
||||
typedef mpbqi_manager::interval mpbqi;
|
||||
|
||||
void swap(mpbqi & a, mpbqi & b) {
|
||||
void swap(mpbqi & a, mpbqi & b) noexcept {
|
||||
swap(a.m_lower, b.m_lower);
|
||||
swap(a.m_upper, b.m_upper);
|
||||
std::swap(a.m_lower_inf, b.m_lower_inf);
|
||||
|
@ -2534,7 +2534,7 @@ namespace realclosure {
|
|||
return depends_on_infinitesimals(a.m_value);
|
||||
}
|
||||
|
||||
static void swap(mpbqi & a, mpbqi & b) {
|
||||
static void swap(mpbqi & a, mpbqi & b) noexcept {
|
||||
realclosure::swap(a, b);
|
||||
}
|
||||
|
||||
|
@ -6313,7 +6313,7 @@ namespace realclosure {
|
|||
m_imp->set(a, n);
|
||||
}
|
||||
|
||||
void manager::swap(numeral & a, numeral & b) {
|
||||
void manager::swap(numeral & a, numeral & b) noexcept {
|
||||
std::swap(a.m_value, b.m_value);
|
||||
}
|
||||
|
||||
|
|
|
@ -164,7 +164,7 @@ namespace realclosure {
|
|||
void set(numeral & a, mpq const & n);
|
||||
void set(numeral & a, numeral const & n);
|
||||
|
||||
void swap(numeral & a, numeral & b);
|
||||
void swap(numeral & a, numeral & b) noexcept;
|
||||
|
||||
/**
|
||||
\brief Return a^{1/k}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue