I have the following class template:
template class MyClass;
where T is some type, N - num
T
N
Why not use a static_assert?
static_assert
template class MyClass { public: template void foo(Args&&... args) { static_assert(sizeof...(Args) == N, "Wrong number of arguments."); // Rest of the implementation. } };