How to define method signature so it will accept same number of arguments as variadic template class definition? For example how to define an Array class:
I assume you want your arguments to be all of the same type, probably using an integer type (I'll just use int
). An easy approach is to leverage the parameter pack you already have:
template
struct shape_helper { typedef int type; };
template
class Array
{
public:
T& operator()(typename shape_helper::type...);
};