struct Foo{ void f(){ f(0); } private: void f(int){} }; struct Bar : private Foo{ using Foo::f; }; int main() { Bar b; b.f(); }
Standard input is empty
prog.cpp:6:8: error: 'void Foo::f(int)' is private
void f(int){}
^
prog.cpp:9:9: error: within this context
struct Bar : private Foo{
^
Standard output is empty