Function one() accepts one parameter pack. Function two() accepts two. Each pack is constrained to be wrapped in types A and B. Why is it
The compiler needs a way to know where is the barrier between the two variadic templates. A clean way of doing this is to define one pack of arguments for an object and the second pack for a static member function. This can be appied to more than two variadic templates by nesting multiple structs in eachother. (keeping the last level as a function)
#include
template
struct Obj
{
template
static void Func()
{
std::cout << sizeof...(First) << std::endl;
std::cout << sizeof...(Second) << std::endl;
}
};
int main()
{
Obj::Func();
return 0;
}