I would be so gratefull if you could tell me exactly why can not we declare operator methods virtual in a base class so we can override them in derived classes.
After scouring the internet I could not find a solid answer.
In case of binary operators, It is logical that overriding would make no sense for the compiler but what about unary operators like ++ etc.
Why isn't it possible to tell the compiler to cal ldifferent binary operator methods based on the object type the reference variable is pointing to?
I apologize if the question is too theoretical and is lacking practicality.