fork download
  1. #include <iostream>
  2.  
  3. namespace hello { namespace world { struct A{}; } }
  4.  
  5. namespace hello { void print(world::A) { std::cout << "Hello\n"; } }
  6.  
  7. namespace hello { namespace world { void print(A) { std::cout << "Hello, World\n"; } } }
  8.  
  9. int main() {
  10. hello::world::A a;
  11. print(a);
  12. return 0;
  13. }
Success #stdin #stdout 0s 3296KB
stdin
Standard input is empty
stdout
Hello, World