#include <iostream>

namespace X
{
	struct Y {};
	template <typename, int, typename> void foo(Y)
	{
		std::cout << "This is X::foo\n";
	}
}

X::Y abc;

template <int> void foo();   // Removing this line breaks it

int main()
{
    foo<int, 4, char>(abc);
}