Changing the accessibility of inherited functions using a declaration cannot be done selectively for a given overload for the simple reason that a using declaration introduces a name into a declarative region and that, by definition, function overloads have the same name.
The only alternative I see here is to use trivial forwarding functions:
class derived : private base { public: void method() { base::method(); } using base::method2;
I'm not quite sure I understand your second question, but yes: you can change the accessibility of base elements in a derived class through using declarations.
icecrime
source share