Code: Select all
class Iterator
{
Iterator& operator +=(s32 num)
{
if(num > 0)
{
while (num-- && this->Current != 0) ++(*this);
}
else
{
while(num++ && this->Current != 0) --(*this);
}
return *this;
}
Iterator& operator -=(s32 num) const { return (*this)+=(-num); }
};
Note the -= operator is a const operator, but it invokes the non-const += and failed compile in VC.
There is no other overloading for +=
Is this a bug? Did it fix in 1.8.0?