fork download
  1. #include <iostream>
  2.  
  3. namespace A{
  4. struct Test{};
  5. template<typename T>
  6. void op(Test t, T t2){
  7. std::cout<<"A"<<std::endl;
  8. }
  9. }
  10.  
  11. namespace B{
  12. struct Test{};
  13.  
  14. template<typename T>
  15. void op(Test t, T t2){
  16. std::cout<<"B"<<std::endl;
  17. }
  18. }
  19.  
  20. int main()
  21. {
  22. A::Test t;
  23. B::Test t2;
  24.  
  25. op(t, t2);
  26. op(t2, t);
  27. }
Success #stdin #stdout 0s 3468KB
stdin
Standard input is empty
stdout
A
B