#include <future>
#include <iostream>
int foo(unsigned a, unsigned b)
{
return 5;
}
int main()
{
std::future<int> f = std::async(foo, 5, 7);
std::cout << f.get();
}
I2luY2x1ZGUgPGZ1dHVyZT4KI2luY2x1ZGUgPGlvc3RyZWFtPgoKaW50IGZvbyh1bnNpZ25lZCBhLCB1bnNpZ25lZCBiKQp7CglyZXR1cm4gNTsKfQoKaW50IG1haW4oKQp7CglzdGQ6OmZ1dHVyZTxpbnQ+IGYgPSBzdGQ6OmFzeW5jKGZvbywgNSwgNyk7CglzdGQ6OmNvdXQgPDwgZi5nZXQoKTsKfQo=