Why is template parameter pack used in a function argument type as its template argument list not able to be explicit specified
问题 I have the following piece of code: template <typename, typename> struct AAA{}; template<typename ...Args> void f(AAA<Args...> *) {} int main() { f<int, int>(nullptr); } This code results in a compile error. When compiling using g++ -std=c++1z the error shows as follows: prog.cc: In function 'int main()': prog.cc:8:24: error: no matching function for call to 'f<int, int>(std::nullptr_t)' f<int, int>(nullptr); ^ prog.cc:5:6: note: candidate: template<class ... Args> void f(AAA<Args ...>*) void