fork download
  1. #include <iostream>
  2. #include <algorithm>
  3.  
  4. template<typename T>
  5. struct Foo{};
  6.  
  7. namespace std
  8. {
  9. template<typename T>
  10. void swap(Foo<T>& f1, Foo<T>& f2)
  11. {
  12. std::cout << "My swap" << std::endl;
  13. }
  14. }
  15.  
  16. int main() {
  17. // your code goes here
  18. Foo<int> foo1, foo2;
  19. std::swap(foo1,foo2);
  20. return 0;
  21. }
Success #stdin #stdout 0s 3296KB
stdin
Standard input is empty
stdout
My swap