const function operator+(const function *) const;
What will happen if you do: x += y; ...when x and y are of the same class. Does it still work in this context or does it have to be x + y;?
They are distinct and unrelated (as far as compiler is concerned)
Though, if you overload 1 of them, it is probably worth also overloading the other for consistency
btw. Here is very good explanation of operator overloadings: https://stackoverflow.com/a/4421719/3595112
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With