added new operators

This commit is contained in:
Andrei Yankovich 2019-07-13 23:02:33 +03:00
parent 157fe48a55
commit e291c4f419
3 changed files with 2 additions and 2 deletions

@ -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);
}