Why in the next program the member function foo has priority over the global foo although the global one match the type?
#include using name
One of the tenets of method overloading is that the specific should trump the general. In your example, the member method will always be more specific than a global method.