fork(2) download
  1. #include <iostream>
  2.  
  3. namespace X
  4. {
  5. struct Y {};
  6. template <typename, int, typename> void foo(Y)
  7. {
  8. std::cout << "This is X::foo\n";
  9. }
  10. }
  11.  
  12. X::Y abc;
  13.  
  14. template <int> void foo(); // Removing this line breaks it
  15.  
  16. int main()
  17. {
  18. foo<int, 4, char>(abc);
  19. }
Success #stdin #stdout 0s 3412KB
stdin
Standard input is empty
stdout
This is X::foo