#include <iostream>
using namespace std; // consider removing this line in serious projects
class T {
public:
double execute(double (*expression)()) {
return expression();
}
};
int main() {
T t;
double result = t.execute([]() -> double {return 1 + 1;});
cout << result << endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOyAvLyBjb25zaWRlciByZW1vdmluZyB0aGlzIGxpbmUgaW4gc2VyaW91cyBwcm9qZWN0cwoKY2xhc3MgVCB7CnB1YmxpYzoKICAgIGRvdWJsZSBleGVjdXRlKGRvdWJsZSAoKmV4cHJlc3Npb24pKCkpIHsKICAgICAgICByZXR1cm4gZXhwcmVzc2lvbigpOwogICAgfQp9OwoKaW50IG1haW4oKSB7CglUIHQ7Cglkb3VibGUgcmVzdWx0ID0gdC5leGVjdXRlKFtdKCkgLT4gZG91YmxlIHtyZXR1cm4gMSArIDE7fSk7Cgljb3V0IDw8IHJlc3VsdCA8PCBlbmRsOwoKCXJldHVybiAwOwp9