3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 17:15:31 +00:00

add move constructor to mpf

This commit is contained in:
Nuno Lopes 2017-10-13 18:23:30 +01:00
parent d1c13f17b0
commit 468e0207f7
2 changed files with 6 additions and 7 deletions

View file

@ -40,12 +40,6 @@ mpf::mpf(unsigned _ebits, unsigned _sbits):
set(ebits, sbits);
}
mpf::mpf(mpf const & other) {
// It is safe if the mpz numbers are small.
// I need it for resize method in vector.
// UNREACHABLE();
}
mpf::~mpf() {
}

View file

@ -50,7 +50,12 @@ class mpf {
public:
mpf();
mpf(unsigned ebits, unsigned sbits);
mpf(mpf const & other);
mpf(mpf && other) :
ebits(other.ebits),
sbits(other.sbits),
sign(other.sign),
significand(std::move(other.significand)),
exponent(other.exponent) {}
~mpf();
unsigned get_ebits() const { return ebits; }
unsigned get_sbits() const { return sbits; }