fork(1) download
  1. #include <iostream>
  2. #include <string>
  3.  
  4. namespace foo{
  5. struct ug{};
  6. void f(ug&){std::cout<<"foo"<<std::endl;}
  7. ug var;
  8. };
  9. namespace bar{
  10. struct ug{};
  11. void f(ug&){std::cout<<"bar"<<std::endl;}
  12. ug var;
  13. };
  14.  
  15. int main()
  16. {
  17. f(foo::var);
  18. f(bar::var);
  19. }
Success #stdin #stdout 0s 15232KB
stdin
Standard input is empty
stdout
foo
bar