#include <iostream>
using namespace std;
template <typename T>
void static_dispatch(const T &callback) {
cout << "static_dipatch: " << callback() << endl;
}
int main() {
int x = 1;
int y = 2;
auto closure = [&] { return x + y; };
static_dispatch(closure);
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKdGVtcGxhdGUgPHR5cGVuYW1lIFQ+CnZvaWQgc3RhdGljX2Rpc3BhdGNoKGNvbnN0IFQgJmNhbGxiYWNrKSB7Cgljb3V0IDw8ICJzdGF0aWNfZGlwYXRjaDogIiA8PCBjYWxsYmFjaygpIDw8IGVuZGw7Cn0KCmludCBtYWluKCkgewoJaW50IHggPSAxOwoJaW50IHkgPSAyOwoJCglhdXRvIGNsb3N1cmUgPSBbJl0geyByZXR1cm4geCArIHk7IH07CgkKCXN0YXRpY19kaXNwYXRjaChjbG9zdXJlKTsKCQoJcmV0dXJuIDA7Cn0=