Please excuse me if I have not got the patch format correct, I'm not much used to SourceForge or public patch/diffs.
This patch patches BaseBigInt/RossiBigInt to:
* Use mutable for vector<ulong> units_, which is required for:
* Use const for conceptually const operators like operator+
* Remove units_not_front_back_is_null and just call truncate_units which makes the same test immediately anyway.
* Make resize_units/truncate_units const as they do not change the value of the object.
* Add inline operations for +*/% acting on ulong.
* Add inline operators for all comparisons except operator<, which are all based on operator<.
* Fixed operator< to not touch its input operand at all.
* Perhaps most importantly, corrected bugs in operator-= which are probably the cause of the two Help messages in the Forum. operator-= erroneously assumes that the input argument vector is no longer than *this' vector.
Hopefully this is useful.
Patch file
C++ BigInt Class: Release 3.0 is availble now at http://sourceforge.net/projects/cpp-bigint/