#include #include using namespace std; class base { public: void f() const {cout << "base::f\n";} void g() const {cout << "base::g\n";} }; class derived: private base { public: using base::f; //using declaration }; int main() { derived d; d.f(); //will compile //d.g(); //won't compile return EXIT_SUCCESS; }