http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54890
Bug #: 54890 Summary: Incorrect SFINAE Rejection Classification: Unclassified Product: gcc Version: 4.7.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: pmens...@comcast.net When explicitly specifying the template parameters to a function template in the following context, the compiler incorrectly removes the function from the overload set for a substitution failure which should not exist. struct A { template<class T> struct apply { }; }; template<class T, class... U> void f(typename T::template apply<U...>*) { } int main() { f<A, int>(nullptr); return 0; } Output from the compiler is: In function ‘int main()’: error: no matching function for call to ‘f(std::nullptr_t)’ note: candidate is: note: template<class T, class ... U> void f(typename T::apply<U ...>*) note: template argument deduction/substitution failed: note: mismatched types ‘A::apply<U ...>*’ and ‘std::nullptr_t’ Which I believe is incorrect.