#include<type_traits>
template<class T, unsigned int N>
class MyClass
{
public :
template<class...T2, typename std::enable_if<sizeof...(T2) == N, int>::type = 0>
void foo(T2... args) {}
};
int main()
{
MyClass<int, 3> T;
T.foo(10,20,20);
}
I2luY2x1ZGU8dHlwZV90cmFpdHM+CiAKdGVtcGxhdGU8Y2xhc3MgVCwgdW5zaWduZWQgaW50IE4+CmNsYXNzIE15Q2xhc3MKewpwdWJsaWMgOgp0ZW1wbGF0ZTxjbGFzcy4uLlQyLCB0eXBlbmFtZSBzdGQ6OmVuYWJsZV9pZjxzaXplb2YuLi4oVDIpID09IE4sIGludD46OnR5cGUgPSAwPgp2b2lkIGZvbyhUMi4uLiBhcmdzKSB7fQp9OwogCmludCBtYWluKCkKewogICAgTXlDbGFzczxpbnQsIDM+IFQ7CiAgICBULmZvbygxMCwyMCwyMCk7Cn0=