When compiling this program: template <class... Args> void F(Args&&...); template <class T, class... Args> int F(Args&&...); int main() { int{F<int>(0)}; } Expected behavior: compile error (call to `F` is ambiguous). Actual behaviour: compiles successfully. Comment from Richard Smith: "I suspect this might be fallout from GCC's workaround for core issue 1395 (after substituting explicitly-specified template arguments, the first 'F' has one pack element deduced and the second 'F' has none, so I suspect the second may look more specialized under GCC's approach to 1395 but not Clang's)." Note that the following program gets rejected by GCC (as expected): template <class T> void F(T); template <class T, class U> void F(U); int main() { F<int>(0); }
Seems Fixed in GCC 10.2.0 and GCC 11+
Fixed with r11-1571-g57b4daf8dc4ed7b6.