fork download
  1. struct A {
  2. protected:
  3. void test() {}
  4. int a;
  5. };
  6.  
  7. struct B : A {
  8. using A::test;
  9. using A::a;
  10. };
  11.  
  12. int main()
  13. {
  14. A a;
  15. a.*(&B::a);
  16. (a.*(&B::test))();
  17.  
  18. return 0;
  19. }
  20.  
Success #stdin #stdout 0s 2736KB
stdin
Standard input is empty
stdout
Standard output is empty