Why does virtual assignment behave differently than other virtual functions of the same signature?
- by David Rodríguez - dribeas
While playing with implementing a virtual assignment operator I have ended with a funny behavior. It is not a compiler glitch, since g++ 4.1, 4.3 and VS 2005 share the same behavior.
Basically, the virtual operator= behaves differently than any other virtual function with respect to the code that is actually being executed.
struct Base {
…