Mixing variadic template values and variadic deduced types
问题 Is the following perfectly defined by the standard ? #include <iostream> template <unsigned int... Values, class... Types> void f(Types&&... values) { std::cout<<sizeof...(Values)<<" "<<sizeof...(Types)<<std::endl; } int main() { f<7, 5>(3); return 0; } It compiles well under g++ 4.8 but I wonder if it is normal. 回答1: From ISO C++ standard's current working draft 14.1 (11): A template parameter pack of a function template shall not be followed by another template >parameter unless that