fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. struct A { protected: int x; };
  5.  
  6. struct B : A { using A::x; };
  7.  
  8. int main() {
  9. B b;
  10.  
  11. b.x = 1;
  12. return 0;
  13. }
Success #stdin #stdout 0s 3464KB
stdin
Standard input is empty
stdout
Standard output is empty