3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-28 19:35:50 +00:00

fix vector<> to support non-POD types

adjust code to std::move and avoid unnecessary/illegal
This commit is contained in:
Nuno Lopes 2017-10-10 17:24:22 +01:00
parent 4d1acadabb
commit 9b54b4e784
35 changed files with 253 additions and 95 deletions

View file

@ -35,7 +35,7 @@ namespace simplex {
struct row_entry {
numeral m_coeff;
var_t m_var;
row_entry(numeral const& c, var_t v): m_coeff(c), m_var(v) {}
row_entry(numeral && c, var_t v) noexcept : m_coeff(std::move(c)), m_var(v) {}
};
private:
@ -61,7 +61,7 @@ namespace simplex {
int m_col_idx;
int m_next_free_row_entry_idx;
};
_row_entry(numeral const & c, var_t v): row_entry(c, v), m_col_idx(0) {}
_row_entry(numeral && c, var_t v) : row_entry(std::move(c), v), m_col_idx(0) {}
_row_entry() : row_entry(numeral(), dead_id), m_col_idx(0) {}
bool is_dead() const { return row_entry::m_var == dead_id; }
};