fork(1) download
  1. struct Foo{
  2. void f(){
  3. f(0);
  4. }
  5. private:
  6. void f(int){}
  7. };
  8.  
  9. struct Bar : private Foo{
  10. using Foo::f;
  11. };
  12.  
  13. int main() {
  14. Bar b;
  15. b.f();
  16. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
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{
         ^
stdout
Standard output is empty