mirror of
https://github.com/Z3Prover/z3
synced 2025-08-04 02:10:23 +00:00
fix bool sign usage
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
parent
c35b561496
commit
eb657a322a
4 changed files with 35 additions and 8 deletions
|
@ -137,7 +137,16 @@ public:
|
|||
m().set(m_val, r.m_val);
|
||||
return *this;
|
||||
}
|
||||
private:
|
||||
rational & operator=(bool) {
|
||||
UNREACHABLE(); return *this;
|
||||
}
|
||||
inline rational operator*(bool r1) const {
|
||||
UNREACHABLE();
|
||||
return *this;
|
||||
}
|
||||
|
||||
public:
|
||||
rational & operator=(int v) {
|
||||
*this = rational(v);
|
||||
return *this;
|
||||
|
@ -506,9 +515,18 @@ inline rational operator*(rational const & r1, rational const & r2) {
|
|||
return rational(r1) *= r2;
|
||||
}
|
||||
|
||||
inline rational operator*(rational const & r1, bool r2) {
|
||||
UNREACHABLE();
|
||||
return r1 * rational(r2);
|
||||
}
|
||||
inline rational operator*(rational const & r1, int r2) {
|
||||
return r1 * rational(r2);
|
||||
}
|
||||
inline rational operator*(bool r1, rational const & r2) {
|
||||
UNREACHABLE();
|
||||
return rational(r1) * r2;
|
||||
}
|
||||
|
||||
inline rational operator*(int r1, rational const & r2) {
|
||||
return rational(r1) * r2;
|
||||
}
|
||||
|
@ -521,6 +539,11 @@ inline rational operator/(rational const & r1, int r2) {
|
|||
return r1 / rational(r2);
|
||||
}
|
||||
|
||||
inline rational operator/(rational const & r1, bool r2) {
|
||||
UNREACHABLE();
|
||||
return r1 / rational(r2);
|
||||
}
|
||||
|
||||
inline rational operator/(int r1, rational const & r2) {
|
||||
return rational(r1) / r2;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue