member función ocultar función libre
void foo(int)
{
}
class X
{
void foo()
{
}
void bar()
{
foo(42);
// error: no matching function for call to 'X::foo(int)'
// note: candidate is:
// note: void X::foo()
// note: candidate expects 0 arguments, 1 provided
}
};
¿Por qué C ++ no puede llamar a la función libre (que es la única con la firma correcta)?