mirror of
https://github.com/Z3Prover/z3
synced 2025-08-07 11:41:22 +00:00
remove a bunch of constructors to avoid copies
still not enough to guarantee that vector::expand doesnt copy (WIP)
This commit is contained in:
parent
98b5abb1d4
commit
7ac2791482
16 changed files with 66 additions and 83 deletions
|
@ -16,8 +16,7 @@ Author:
|
|||
Revision History:
|
||||
|
||||
--*/
|
||||
#ifndef MPF_H_
|
||||
#define MPF_H_
|
||||
#pragma once
|
||||
|
||||
#include<string>
|
||||
#include "util/mpz.h"
|
||||
|
@ -45,18 +44,13 @@ class mpf {
|
|||
unsigned sign:1; // counts as one sbit.
|
||||
mpz significand;
|
||||
mpf_exp_t exponent;
|
||||
mpf & operator=(mpf const & other) { UNREACHABLE(); return *this; }
|
||||
void set(unsigned _ebits, unsigned _sbits);
|
||||
public:
|
||||
mpf();
|
||||
mpf(unsigned ebits, unsigned sbits);
|
||||
mpf(mpf && other) :
|
||||
ebits(other.ebits),
|
||||
sbits(other.sbits),
|
||||
sign(other.sign),
|
||||
significand(std::move(other.significand)),
|
||||
exponent(other.exponent) {}
|
||||
mpf(mpf &&) = default;
|
||||
~mpf();
|
||||
mpf & operator=(mpf const & other) = delete;
|
||||
unsigned get_ebits() const { return ebits; }
|
||||
unsigned get_sbits() const { return sbits; }
|
||||
void swap(mpf & other);
|
||||
|
@ -325,5 +319,3 @@ public:
|
|||
};
|
||||
|
||||
typedef _scoped_numeral_vector<mpf_manager> scoped_mpf_vector;
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue