From http://stackoverflow.com/questions/14664589/variadic-template-code-compiles-on-gcc-4-6-but-not-on-clang-or-gcc-4-7 : class Test { public: template <class... A2> void print (void(*function)(A2..., float, double)) { } }; void test_print (int a, float b, double c) { } int main () { Test test; test.print<int> (&test_print); } Fails with source.cpp:14:33: note: candidate is: source.cpp:3:33: note: template<class ... A2> void Test::print(void (*)(A2 ..., float, double)) source.cpp:3:33: note: template argument deduction/substitution failed: source.cpp:14:33: note: mismatched types 'float' and 'int' GCC does apparently not substitute the explicitly specified arguments of "A2" before attempting the argument deduction.
Confirmed.
*** Bug 84893 has been marked as a duplicate of this bug. ***
*** Bug 69205 has been marked as a duplicate of this bug. ***
*** Bug 104672 has been marked as a duplicate of this bug. ***
*** Bug 105796 has been marked as a duplicate of this bug. ***
Simplier example: ``` int func(int, char); template<typename... TArgs> int testFunc(int (*)(TArgs..., char)); int x = testFunc<int>(func); ```