I think return by reference rather then by value after assignment (operator =) is more reasonable.
return a reference can make the struct BigInteger more similar to the built-in int.
consider the code following:
int one;BigInterger big_one;(one = 1) = 2;(big_one = 1) =2;
after assignment, both big_one and one should be 2.
can do this by return reference after assignment.
I think return by reference rather then by value after assignment (operator =) is more reasonable. return a reference can make the
struct BigInteger
more similar to the built-inint
.consider the code following:
int one;
BigInterger big_one;
(one = 1) = 2;
(big_one = 1) =2;
after assignment, bothbig_one
andone
should be 2. can do this by return reference after assignment.