#include <iostream>
using namespace std;
template<class S> class Foo;
template<class Ret, class Arg, class... Args>
class Foo<Ret(Arg*, Args...)>
{
public:
template<class FUNC>
Foo(FUNC func, int)
{
cout << "func" << endl;
}
template<class Rett>
Foo(Rett(int::*method)(Args... args)) { cout << "fptr" << endl; }
};
int main()
{
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwp0ZW1wbGF0ZTxjbGFzcyBTPiBjbGFzcyBGb287Cgp0ZW1wbGF0ZTxjbGFzcyBSZXQsIGNsYXNzIEFyZywgY2xhc3MuLi4gQXJncz4KY2xhc3MgRm9vPFJldChBcmcqLCBBcmdzLi4uKT4gCnsKcHVibGljOgoJdGVtcGxhdGU8Y2xhc3MgRlVOQz4KCUZvbyhGVU5DIGZ1bmMsIGludCkKCXsKCQljb3V0IDw8ICJmdW5jIiA8PCBlbmRsOwoJfQoJdGVtcGxhdGU8Y2xhc3MgUmV0dD4KCUZvbyhSZXR0KGludDo6Km1ldGhvZCkoQXJncy4uLiBhcmdzKSkgeyBjb3V0IDw8ICJmcHRyIiA8PCBlbmRsOyB9CgkKfTsKCmludCBtYWluKCkKewoJcmV0dXJuIDA7Cn0K
prog.cpp:15:14: error: expected ')' before '::' token
Foo(Rett(int::*method)(Args... args)) { cout << "fptr" << endl; }
^
prog.cpp:15:14: error: expected ',' or '...' before '::' token
prog.cpp:15:38: error: expected constructor, destructor, or type conversion before ')' token
Foo(Rett(int::*method)(Args... args)) { cout << "fptr" << endl; }
^