How to specialize a template with template-tempate parameters
问题 Edit at the end I have a function which takes a template: template <template <typename ...> class P, typename ... Args> void f(const P<Args...> &p) { std::cout << "Template with " << sizeof...(Args) << " parameters!\n"; } It works pretty good with any kind of templates I've tested so far: f(std::valarray<int>{}); // Prints: "Template with 1 parameters!" f(std::pair<char, char>{}); // Prints: "Template with 2 parameters!" f(std::set<float>{}); // Prints: "Template with 3 parameters!" f(std: