https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87429
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- Clang also compiles it, and prints "1". EDG rejects it as ambiguous: "a.cc", line 8: error: more than one instance of overloaded function "foo" matches the argument list: function template "int foo<T>(int)" function template "int foo<T>(int)" argument types are: (int) return foo<int>(0); ^ 1 error detected in the compilation of "a.cc".