#include <iostream>
#include <functional>
using namespace std;
template <typename ReturnType, typename... Args>
auto CallIt( std::function<ReturnType( Args... )> method ) -> std::function<ReturnType( Args... )>
{
return method;
}
int main() {
std::function<bool(int,int)> lambda = [] ( int a, int b ) { return a > b; };
auto test = CallIt( lambda );
cout << test(4,1);
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8ZnVuY3Rpb25hbD4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCnRlbXBsYXRlIDx0eXBlbmFtZSBSZXR1cm5UeXBlLCB0eXBlbmFtZS4uLiBBcmdzPgphdXRvIENhbGxJdCggc3RkOjpmdW5jdGlvbjxSZXR1cm5UeXBlKCBBcmdzLi4uICk+IG1ldGhvZCApIC0+IHN0ZDo6ZnVuY3Rpb248UmV0dXJuVHlwZSggQXJncy4uLiApPgp7CiAgICByZXR1cm4gbWV0aG9kOwp9CgoKCmludCBtYWluKCkgewoKICAgIHN0ZDo6ZnVuY3Rpb248Ym9vbChpbnQsaW50KT4gbGFtYmRhID0gW10gKCBpbnQgYSwgaW50IGIgKSB7IHJldHVybiBhID4gYjsgfTsKICAgIAogICAgYXV0byB0ZXN0ID0gQ2FsbEl0KCBsYW1iZGEgKTsKICAgIGNvdXQgPDwgdGVzdCg0LDEpOwoKCiAgICByZXR1cm4gMDsKfQ==