fork download
  1. class foo
  2. {
  3. class bar {};
  4. public:
  5. typedef bar pubbar;
  6. };
  7.  
  8. int main()
  9. {
  10. foo::pubbar b; // we would not be allowed to name foo::bar, but since we may name
  11. // it's alias foo::pubbar, we can now use foo::bar as if it were public.
  12. }
Success #stdin #stdout 0s 2848KB
stdin
Standard input is empty
stdout
Standard output is empty