Your problem is that do_bigadd
is not const
(but this
is const
in operator+
, and so you are trying to call a non-const member function of the const object this
). You need to make do_bigadd
const:
bigvalue_t do_bigadd (const bigvalue_t& left, const bigvalue_t& right) const {
}
If this in turn causes any issues in do_bigadd
, you'll have to iron them out. However, based on the fact that you are passing both operands to do_bigadd
, I'm wondering if you actually meant for it to be a static or non-member function in the first place.