Daily bit(e) of C++ | Member function call resolution
Daily bit(e) of C++ #461, Member function call resolution based on the static type of the variable.
When calling a member function, the name lookup can lead to surprising behaviour.
Name lookup operates in steps and will stop when it encounters any match; this includes non-viable matches.
The lookup always starts in the class type scope that matches the variable's static type, not the dynamic type of the object.