forked from QuasarApp/QtBigInt
added new operators
This commit is contained in:
parent
157fe48a55
commit
e291c4f419
@ -7,6 +7,7 @@
|
||||
|
||||
#include "bigint.h"
|
||||
#include <limits>
|
||||
#include <cstring>
|
||||
|
||||
// constructors
|
||||
BigInt::BigInt() {
|
||||
|
@ -54,7 +54,6 @@ public:
|
||||
BigInt& operator = (const BigInt& val);
|
||||
BigInt& operator = (const std::string &imput);
|
||||
BigInt& operator = (long val);
|
||||
// BigInt& operator = (const BigInt& val);
|
||||
|
||||
friend BigInt operator + ( BigInt left, const BigInt& right);
|
||||
friend BigInt operator + ( BigInt left, const std::string &right);
|
||||
@ -77,7 +76,6 @@ public:
|
||||
friend BigInt operator-(BigInt val);
|
||||
|
||||
friend BigInt& operator -= ( BigInt &left, long right);
|
||||
// friend BigInt& operator -= ( long left, BigInt & right);
|
||||
|
||||
friend BigInt& operator -= ( BigInt &left, const BigInt& right);
|
||||
friend BigInt& operator -= ( BigInt &left, const std::string &right);
|
||||
|
@ -756,6 +756,7 @@ void arithmetictests::testOperators() {
|
||||
QVERIFY(num1.sizeBytes() == sizeof (long));
|
||||
QVERIFY(num1.sizeType() == sizeof (long) * 2);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user