class Foo
{
public:
int fn()
{
return 1;
}
int fn(int i)
{
return i; //2nd fn()
}
};
class Bar:Foo
{
public :
Foo::fn;
};
int main(int argc, char** argv)
{
Bar b;
cout<<b.fn(2)<<endl;
}
is to possible to hide fn(int) in the concrete class "Bar"
AFAIK no, you cannot 'hide' names from namespaces. This related to names, so that includes all possible overloads of the same name.
Similarly, there is no way to
unusing
a name/namespace.This very phenomenon leads to the rather little-known ADL Pitfall that library writers should always be aware of.
PS. in the sample code, of course you could just drop the line saying
/*using*/ Foo::fn;
line... but I guess that is not your actual code....