I have a function that looks like
bigvalue_t do_bigadd (const bigvalue_t& left, const bigvalue_t& right) {
}
and it is being called here
bigint bigint::operator+ (const bigint& that) const {
bigint result;
result.big_value = do_bigadd(this->big_value, that.big_value);
}
I'm getting the following compilation error
error: passing ‘const bigint’ as ‘this’ argument of ‘bigvalue_t bigint::do_bigadd(const bigvalue_t&, const bigvalue_t&)’ discards qualifiers [-fpermissive]
I know what is wrong, but I can't think of a way to deal with it. How do I make 'this' as const bigint& when it is a pointer?